From 2d42dc84dd2dea3d0f79831bde3a14d01833c33a Mon Sep 17 00:00:00 2001 From: Drew Powers Date: Tue, 25 May 2021 09:55:46 -0600 Subject: [PATCH] Change additionalProperties default --- README.md | 1 + bin/cli.js | 26 +- examples/stripe-openapi3.ts | 28108 +++++++------- src/index.ts | 31 +- src/transform/headers.ts | 15 +- src/transform/index.ts | 150 +- src/transform/operation.ts | 64 +- src/transform/parameters.ts | 85 +- src/transform/paths.ts | 49 +- src/transform/request.ts | 34 + src/transform/responses.ts | 79 +- src/transform/schema.ts | 55 +- src/types.ts | 21 + tests/bin/expected/prettier-js.ts | 16 +- tests/bin/expected/prettier-json.ts | 16 +- tests/bin/expected/stdout.ts | 16 +- tests/formatter.test.ts | 4 +- tests/operation.test.ts | 170 +- tests/parameters.test.ts | 120 +- tests/paths.test.ts | 502 +- tests/raw-schema.test.ts | 40 - tests/request.test.ts | 105 + tests/schema.test.ts | 360 +- tests/v2/index.test.ts | 2 +- tests/v3/expected/github.additional.ts | 31284 +++++++++++++++ tests/v3/expected/github.immutable.ts | 2469 +- tests/v3/expected/github.ts | 2440 +- tests/v3/expected/http.ts | 164 +- tests/v3/expected/manifold.additional.ts | 1153 + tests/v3/expected/manifold.immutable.ts | 164 +- tests/v3/expected/manifold.ts | 164 +- tests/v3/expected/null-in-enum.additional.ts | 38 + tests/v3/expected/null-in-enum.immutable.ts | 8 +- tests/v3/expected/null-in-enum.ts | 8 +- .../petstore-openapitools.additional.ts | 478 + .../petstore-openapitools.immutable.ts | 16 +- tests/v3/expected/petstore-openapitools.ts | 16 +- tests/v3/expected/petstore.additional.ts | 465 + tests/v3/expected/petstore.immutable.ts | 16 +- tests/v3/expected/petstore.ts | 16 +- tests/v3/expected/stripe.additional.ts | 31341 ++++++++++++++++ tests/v3/expected/stripe.immutable.ts | 5054 ++- tests/v3/expected/stripe.ts | 4649 ++- tests/v3/index.test.ts | 14 + 44 files changed, 87436 insertions(+), 22590 deletions(-) create mode 100644 src/transform/request.ts create mode 100644 tests/request.test.ts create mode 100644 tests/v3/expected/github.additional.ts create mode 100644 tests/v3/expected/manifold.additional.ts create mode 100644 tests/v3/expected/null-in-enum.additional.ts create mode 100644 tests/v3/expected/petstore-openapitools.additional.ts create mode 100644 tests/v3/expected/petstore.additional.ts create mode 100644 tests/v3/expected/stripe.additional.ts diff --git a/README.md b/README.md index e8cf8c151..ed30abbc9 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,7 @@ For anything more complicated, or for generating specs dynamically, you can also | `--output [location]` | `-o` | (stdout) | Where should the output file be saved? | | `--auth [token]` | | | (optional) Provide an auth token to be passed along in the request (only if accessing a private schema). | | `--immutable-types` | | `false` | (optional) Generates immutable types (readonly properties and readonly array). | +| `--additional-properties` | `-ap` | `false` | (optional) Allow arbitrary properties for all schema objects without `additionalProperties: false` | | `--prettier-config [location]` | | | (optional) Path to your custom Prettier configuration for output | | `--raw-schema` | | `false` | Generate TS types from partial schema (e.g. having `components.schema` at the top level) | diff --git a/bin/cli.js b/bin/cli.js index 57b3963ed..d9c0f48f9 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -12,13 +12,14 @@ const cli = meow( $ openapi-typescript [input] [options] Options - --help display this - --output, -o Specify output file (default: stdout) - --auth (optional) Provide an authentication token for private URL - --immutable-types (optional) Generates immutable types (readonly properties and readonly array) - --prettier-config (optional) specify path to Prettier config file - --raw-schema (optional) Read from raw schema instead of document - --version (optional) Schema version (must be present for raw schemas) + --help display this + --output, -o Specify output file (default: stdout) + --auth (optional) Provide an authentication token for private URL + --immutable-types, -it (optional) Generates immutable types (readonly properties and readonly array) + --additional-properties, -ap (optional) Allow arbitrary properties for all schema objects without "additionalProperties: false" + --prettier-config, -c (optional) specify path to Prettier config file + --raw-schema (optional) Parse as partial schema (raw components) + --version (optional) Force schema parsing version `, { flags: { @@ -31,9 +32,15 @@ Options }, immutableTypes: { type: "boolean", + alias: "it", + }, + additionalProperties: { + type: "boolean", + alias: "ap", }, prettierConfig: { type: "string", + alias: "c", }, rawSchema: { type: "boolean", @@ -58,6 +65,9 @@ async function main() { if (output === "FILE") { console.info(bold(`✨ openapi-typescript ${require("../package.json").version}`)); // only log if we’re NOT writing to stdout } + if (cli.flags.rawSchema && !cli.flags.version) { + throw new Error(`--raw-schema requires --version flag`); + } // 1. input let spec = undefined; @@ -73,6 +83,8 @@ async function main() { // 2. generate schema (the main part!) const result = openapiTS(spec, { + auth: cli.flags.auth, + additionalProperties: cli.flags.additionalProperties, immutableTypes: cli.flags.immutableTypes, prettierConfig: cli.flags.prettierConfig, rawSchema: cli.flags.rawSchema, diff --git a/examples/stripe-openapi3.ts b/examples/stripe-openapi3.ts index 4e0b0f179..8461aba6e 100644 --- a/examples/stripe-openapi3.ts +++ b/examples/stripe-openapi3.ts @@ -1492,13 +1492,9 @@ export interface components { */ account: { /** Business information about the account. */ - business_profile?: Partial< - components["schemas"]["account_business_profile"] - > | null; + business_profile?: Partial | null; /** The business type. */ - business_type?: - | ("company" | "government_entity" | "individual" | "non_profit") - | null; + business_type?: ("company" | "government_entity" | "individual" | "non_profit") | null; capabilities?: components["schemas"]["account_capabilities"]; /** Whether the account can create live charges. */ charges_enabled?: boolean; @@ -1516,8 +1512,7 @@ export interface components { /** External accounts (bank accounts and debit cards) currently attached to this account */ external_accounts?: { /** The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ - data: (Partial & - Partial)[]; + data: (Partial & Partial)[]; /** True if this list has another page of items after this one that can be fetched. */ has_more: boolean; /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ @@ -1827,13 +1822,9 @@ export interface components { /** Amount in %s refunded (can be less than the amount attribute on the fee if a partial refund was issued) */ amount_refunded: number; /** ID of the Connect application that earned the fee. */ - application: Partial & - Partial; + application: Partial & Partial; /** Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). */ - balance_transaction?: - | (Partial & - Partial) - | null; + balance_transaction?: (Partial & Partial) | null; /** ID of the charge that the application fee was taken from. */ charge: Partial & Partial; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ @@ -1847,9 +1838,7 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "application_fee"; /** ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter. */ - originating_transaction?: - | (Partial & Partial) - | null; + originating_transaction?: (Partial & Partial) | null; /** Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. */ refunded: boolean; /** A list of refunds that have been applied to the fee. */ @@ -1999,9 +1988,7 @@ export interface components { */ bank_account: { /** The ID of the account that the bank account is associated with. */ - account?: - | (Partial & Partial) - | null; + account?: (Partial & Partial) | null; /** The name of the person or business that owns the bank account. */ account_holder_name?: string | null; /** The type of entity that holds the account. This can be either `individual` or `company`. */ @@ -2174,9 +2161,7 @@ export interface components { */ card: { /** 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?: - | (Partial & Partial) - | null; + account?: (Partial & Partial) | null; /** City/District/Suburb/Town/Village. */ address_city?: string | null; /** Billing address country, if provided when creating card. */ @@ -2231,9 +2216,7 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "card"; /** 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?: - | (Partial & Partial) - | null; + recipient?: (Partial & Partial) | null; /** 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 | null; }; @@ -2251,20 +2234,13 @@ export interface components { /** Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued). */ amount_refunded: number; /** ID of the Connect application that created the charge. */ - application?: - | (Partial & Partial) - | null; + application?: (Partial & Partial) | null; /** 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?: - | (Partial & Partial) - | null; + application_fee?: (Partial & Partial) | null; /** 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 | null; /** ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). */ - balance_transaction?: - | (Partial & - Partial) - | null; + balance_transaction?: (Partial & Partial) | null; billing_details: components["schemas"]["billing_details"]; /** 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; @@ -2289,15 +2265,11 @@ export interface components { /** Message to user further explaining reason for charge failure if available. */ failure_message?: string | null; /** Information on fraud assessments for the charge. */ - fraud_details?: Partial< - components["schemas"]["charge_fraud_details"] - > | null; + fraud_details?: Partial | null; /** Unique identifier for the object. */ id: string; /** ID of the invoice this charge is for if one exists. */ - invoice?: - | (Partial & Partial) - | null; + invoice?: (Partial & Partial) | null; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -2305,27 +2277,19 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "charge"; /** 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?: - | (Partial & Partial) - | null; + on_behalf_of?: (Partial & Partial) | null; /** ID of the order this charge is for if one exists. */ - order?: - | (Partial & Partial) - | null; + order?: (Partial & Partial) | null; /** Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. */ outcome?: Partial | null; /** `true` if the charge succeeded, or was successfully authorized for later capture. */ paid: boolean; /** ID of the PaymentIntent associated with this charge, if one exists. */ - payment_intent?: - | (Partial & Partial) - | null; + payment_intent?: (Partial & Partial) | null; /** ID of the payment method used in this charge. */ payment_method?: string | null; /** Details about the payment method at the time of the transaction. */ - payment_method_details?: Partial< - components["schemas"]["payment_method_details"] - > | null; + payment_method_details?: Partial | null; /** This is the email address that the receipt for this charge was sent to. */ receipt_email?: string | null; /** 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. */ @@ -2346,15 +2310,11 @@ export interface components { url: string; }; /** ID of the review associated with this charge if one exists. */ - review?: - | (Partial & Partial) - | null; + review?: (Partial & Partial) | null; /** Shipping information for the charge. */ shipping?: Partial | null; /** 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?: - | (Partial & Partial) - | null; + source_transfer?: (Partial & Partial) | null; /** 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; /** 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. */ @@ -2364,9 +2324,7 @@ export interface components { /** ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). */ transfer?: Partial & Partial; /** 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?: Partial< - components["schemas"]["charge_transfer_data"] - > | null; + transfer_data?: Partial | null; /** 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; }; @@ -2434,9 +2392,7 @@ export interface components { * during the session unless an existing customer was provided when * the session was created. */ - customer?: - | (Partial & Partial) - | null; + customer?: (Partial & Partial) | null; /** * 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. @@ -2446,9 +2402,7 @@ export interface components { */ customer_email?: string | null; /** The line items, plans, or SKUs purchased by the customer. */ - display_items?: - | components["schemas"]["checkout_session_display_item"][] - | null; + display_items?: components["schemas"]["checkout_session_display_item"][] | null; /** * Unique identifier for the object. Used to pass to `redirectToCheckout` * in Stripe.js. @@ -2485,18 +2439,14 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "checkout.session"; /** The ID of the PaymentIntent for Checkout Sessions in `payment` mode. */ - payment_intent?: - | (Partial & Partial) - | null; + payment_intent?: (Partial & Partial) | null; /** * A list of the types of payment methods (e.g. card) this Checkout * Session is allowed to accept. */ payment_method_types: string[]; /** The ID of the SetupIntent for Checkout Sessions in `setup` mode. */ - setup_intent?: - | (Partial & Partial) - | null; + setup_intent?: (Partial & Partial) | null; /** Shipping information for this Checkout Session. */ shipping?: Partial | null; /** When set, provides configuration for Checkout to collect a shipping address from a customer. */ @@ -2511,9 +2461,7 @@ export interface components { */ submit_type?: ("auto" | "book" | "donate" | "pay") | null; /** The ID of the subscription for Checkout Sessions in `subscription` mode. */ - subscription?: - | (Partial & Partial) - | null; + subscription?: (Partial & Partial) | null; /** * The URL the customer will be directed to after the payment or * subscription creation is successful. @@ -2643,8 +2591,7 @@ export interface components { customer: Partial & Partial; /** Customer balance transaction related to this credit note. */ customer_balance_transaction?: - | (Partial & - Partial) + | (Partial & Partial) | null; /** The integer amount in **%s** representing the amount of the discount that was credited. */ discount_amount: number; @@ -2678,18 +2625,9 @@ export interface components { /** The link to download the PDF of the credit note. */ pdf: string; /** Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` */ - reason?: - | ( - | "duplicate" - | "fraudulent" - | "order_change" - | "product_unsatisfactory" - ) - | null; + reason?: ("duplicate" | "fraudulent" | "order_change" | "product_unsatisfactory") | null; /** Refund related to this credit note. */ - refund?: - | (Partial & Partial) - | null; + refund?: (Partial & Partial) | null; /** 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). */ status: "issued" | "void"; /** The integer amount in **%s** representing the amount of the credit note, excluding tax and discount. */ @@ -2860,9 +2798,7 @@ export interface components { /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** The ID of the credit note (if any) related to the transaction. */ - credit_note?: - | (Partial & Partial) - | null; + credit_note?: (Partial & Partial) | null; /** 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; /** The ID of the customer the transaction belongs to. */ @@ -2874,9 +2810,7 @@ export interface components { /** Unique identifier for the object. */ id: string; /** The ID of the invoice (if any) related to the transaction. */ - invoice?: - | (Partial & Partial) - | null; + invoice?: (Partial & Partial) | null; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -2969,9 +2903,7 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "discount"; }; - deleted_external_account: Partial< - components["schemas"]["deleted_bank_account"] - > & + deleted_external_account: Partial & Partial; deleted_invoice: { /** Always true for a deleted object */ @@ -2989,9 +2921,7 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "invoiceitem"; }; - deleted_payment_source: Partial< - components["schemas"]["deleted_alipay_account"] - > & + deleted_payment_source: Partial & Partial & Partial & Partial; @@ -3158,9 +3088,7 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "dispute"; /** ID of the PaymentIntent that was disputed. */ - payment_intent?: - | (Partial & Partial) - | null; + payment_intent?: (Partial & Partial) | null; /** 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; /** Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `charge_refunded`, `won`, or `lost`. */ @@ -3180,17 +3108,13 @@ export interface components { /** The billing address provided by the customer. */ billing_address?: string | null; /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. */ - cancellation_policy?: - | (Partial & Partial) - | null; + cancellation_policy?: (Partial & Partial) | null; /** An explanation of how and when the customer was shown your refund policy prior to purchase. */ cancellation_policy_disclosure?: string | null; /** A justification for why the customer's subscription was not canceled. */ cancellation_rebuttal?: string | null; /** (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?: - | (Partial & Partial) - | null; + customer_communication?: (Partial & Partial) | null; /** The email address of the customer. */ customer_email_address?: string | null; /** The name of the customer. */ @@ -3198,13 +3122,9 @@ export interface components { /** The IP address that the customer used when making the purchase. */ customer_purchase_ip?: string | null; /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. */ - customer_signature?: - | (Partial & Partial) - | null; + customer_signature?: (Partial & Partial) | null; /** (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?: - | (Partial & Partial) - | null; + duplicate_charge_documentation?: (Partial & Partial) | null; /** An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. */ duplicate_charge_explanation?: string | null; /** The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. */ @@ -3212,13 +3132,9 @@ export interface components { /** A description of the product or service that was sold. */ product_description?: string | null; /** (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?: - | (Partial & Partial) - | null; + receipt?: (Partial & Partial) | null; /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. */ - refund_policy?: - | (Partial & Partial) - | null; + refund_policy?: (Partial & Partial) | null; /** Documentation demonstrating that the customer was shown your refund policy prior to purchase. */ refund_policy_disclosure?: string | null; /** A justification for why the customer is not entitled to a refund. */ @@ -3226,9 +3142,7 @@ export interface components { /** The date on which the customer received or began receiving the purchased service, in a clear human-readable format. */ service_date?: string | null; /** (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?: - | (Partial & Partial) - | null; + service_documentation?: (Partial & Partial) | null; /** The address to which a physical product was shipped. You should try to include as complete address information as possible. */ shipping_address?: string | null; /** 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. */ @@ -3236,15 +3150,11 @@ export interface components { /** The date on which a physical product began its route to the shipping address, in a clear human-readable format. */ shipping_date?: string | null; /** (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?: - | (Partial & Partial) - | null; + shipping_documentation?: (Partial & Partial) | null; /** 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; /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. */ - uncategorized_file?: - | (Partial & Partial) - | null; + uncategorized_file?: (Partial & Partial) | null; /** Any additional evidence or statements. */ uncategorized_text?: string | null; }; @@ -3324,9 +3234,7 @@ export interface components { /** 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; /** Information on the API request that instigated the event. */ - request?: Partial< - components["schemas"]["notification_event_request"] - > | null; + request?: Partial | null; /** Description of the event (e.g., `invoice.created` or `charge.refunded`). */ type: string; }; @@ -3351,8 +3259,7 @@ export interface components { /** 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 }; }; - external_account: Partial & - Partial; + external_account: Partial & Partial; fee: { /** Amount of the fee, in cents. */ amount: number; @@ -3376,10 +3283,7 @@ export interface components { /** Amount, in %s. */ amount: number; /** Balance transaction that describes the impact on your account balance. */ - balance_transaction?: - | (Partial & - Partial) - | null; + balance_transaction?: (Partial & Partial) | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** 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). */ @@ -3551,9 +3455,7 @@ export interface components { ) | null; /** ID of the latest charge generated for this invoice, if any. */ - charge?: - | (Partial & Partial) - | null; + charge?: (Partial & Partial) | null; /** 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. */ collection_method?: ("charge_automatically" | "send_invoice") | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ @@ -3561,9 +3463,7 @@ export interface components { /** 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 fields displayed on the invoice. */ - custom_fields?: - | components["schemas"]["invoice_setting_custom_field"][] - | null; + custom_fields?: components["schemas"]["invoice_setting_custom_field"][] | null; /** The ID of the customer who will be billed. */ customer: Partial & Partial & @@ -3581,13 +3481,9 @@ export interface components { /** 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. */ customer_tax_exempt?: ("exempt" | "none" | "reverse") | null; /** 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; + customer_tax_ids?: components["schemas"]["invoices_resource_invoice_tax_id"][] | null; /** 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?: - | (Partial & Partial) - | null; + default_payment_method?: (Partial & Partial) | null; /** 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?: | (Partial & @@ -3639,9 +3535,7 @@ export interface components { /** 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; /** 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?: - | (Partial & Partial) - | null; + payment_intent?: (Partial & Partial) | null; /** End of the usage period during which invoice items were added to this invoice. */ period_end: number; /** Start of the usage period during which invoice items were added to this invoice. */ @@ -3657,14 +3551,10 @@ export interface components { /** Extra information about an invoice for the customer's credit card statement. */ statement_descriptor?: string | null; /** 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?: - | ("deleted" | "draft" | "open" | "paid" | "uncollectible" | "void") - | null; + status?: ("deleted" | "draft" | "open" | "paid" | "uncollectible" | "void") | null; status_transitions: components["schemas"]["invoices_status_transitions"]; /** The subscription that this invoice was prepared for, if any. */ - subscription?: - | (Partial & Partial) - | null; + subscription?: (Partial & Partial) | null; /** Only set for upcoming invoices that preview prorations. The time used to calculate prorations. */ subscription_proration_date?: number; /** Total of all subscriptions, invoice items, and prorations on the invoice before any discount or tax is applied. */ @@ -3701,13 +3591,9 @@ export interface components { }; invoice_setting_customer_setting: { /** Default custom fields to be displayed on invoices for this customer. */ - custom_fields?: - | components["schemas"]["invoice_setting_custom_field"][] - | null; + custom_fields?: components["schemas"]["invoice_setting_custom_field"][] | null; /** 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?: - | (Partial & Partial) - | null; + default_payment_method?: (Partial & Partial) | null; /** Default footer to be displayed on invoices for this customer. */ footer?: string | null; }; @@ -3756,9 +3642,7 @@ export interface components { /** Unique identifier for the object. */ id: string; /** The ID of the invoice this invoice item belongs to. */ - invoice?: - | (Partial & Partial) - | null; + invoice?: (Partial & Partial) | null; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -3773,9 +3657,7 @@ export interface components { /** 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; /** The subscription that this invoice item has been created for, if any. */ - subscription?: - | (Partial & Partial) - | null; + subscription?: (Partial & Partial) | null; /** The subscription item that this invoice item has been created for, if any. */ subscription_item?: string; /** 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. */ @@ -3863,20 +3745,12 @@ export interface components { /** Whether the authorization has been approved. */ approved: boolean; /** How the card details were provided. */ - authorization_method: - | "chip" - | "contactless" - | "keyed_in" - | "online" - | "swipe"; + authorization_method: "chip" | "contactless" | "keyed_in" | "online" | "swipe"; /** List of balance transactions associated with this authorization. */ balance_transactions: components["schemas"]["balance_transaction"][]; card: components["schemas"]["issuing.card"]; /** The cardholder to whom this authorization belongs. */ - cardholder?: - | (Partial & - Partial) - | null; + cardholder?: (Partial & Partial) | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** 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). */ @@ -3895,9 +3769,7 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "issuing.authorization"; /** The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook. */ - pending_request?: Partial< - components["schemas"]["issuing_authorization_pending_request"] - > | null; + pending_request?: Partial | null; /** 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: components["schemas"]["issuing_authorization_request"][]; /** The current status of the authorization in its lifecycle. */ @@ -3938,13 +3810,9 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "issuing.card"; /** The latest card that replaces this card, if any. */ - replaced_by?: - | (Partial & Partial) - | null; + replaced_by?: (Partial & Partial) | null; /** The card this card replaces, if any. */ - replacement_for?: - | (Partial & Partial) - | null; + replacement_for?: (Partial & Partial) | null; /** The reason why the previous card needed to be replaced. */ replacement_reason?: ("damaged" | "expired" | "lost" | "stolen") | null; /** Where and how the card will be shipped. */ @@ -3963,9 +3831,7 @@ export interface components { "issuing.cardholder": { billing: components["schemas"]["issuing_cardholder_address"]; /** Additional information about a `company` cardholder. */ - company?: Partial< - components["schemas"]["issuing_cardholder_company"] - > | null; + company?: Partial | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** The cardholder's email address. */ @@ -3973,9 +3839,7 @@ export interface components { /** Unique identifier for the object. */ id: string; /** Additional information about an `individual` cardholder. */ - individual?: Partial< - components["schemas"]["issuing_cardholder_individual"] - > | null; + individual?: Partial | null; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -3988,9 +3852,7 @@ export interface components { phone_number?: string | null; requirements: components["schemas"]["issuing_cardholder_requirements"]; /** Spending rules that give you some control over how this cardholder's cards can be used. Refer to our [authorizations](https://stripe.com/docs/issuing/purchases/authorizations) documentation for more details. */ - spending_controls?: Partial< - components["schemas"]["issuing_cardholder_authorization_controls"] - > | null; + spending_controls?: Partial | null; /** Specifies whether to permit authorizations on this cardholder's cards. */ status: "active" | "blocked" | "inactive"; /** One of `individual` or `company`. */ @@ -4055,22 +3917,13 @@ export interface components { /** 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; /** The `Authorization` object that led to this transaction. */ - authorization?: - | (Partial & - Partial) - | null; + authorization?: (Partial & Partial) | null; /** ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction. */ - balance_transaction?: - | (Partial & - Partial) - | null; + balance_transaction?: (Partial & Partial) | null; /** The card used to make this transaction. */ card: Partial & Partial; /** The cardholder to whom this transaction belongs. */ - cardholder?: - | (Partial & - Partial) - | null; + cardholder?: (Partial & Partial) | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** 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). */ @@ -4746,9 +4599,7 @@ export interface components { )[] | null; /** Limit the spending with rules based on time intervals and categories. */ - spending_limits?: - | components["schemas"]["issuing_card_spending_limit"][] - | null; + spending_limits?: components["schemas"]["issuing_card_spending_limit"][] | null; /** Currency for the amounts within spending_limits. Locked to the currency of the card. */ spending_limits_currency?: string | null; }; @@ -4763,16 +4614,7 @@ export interface components { /** Shipment service, such as `standard` or `express`. */ service: "express" | "priority" | "standard"; /** The delivery status of the card. */ - status?: - | ( - | "canceled" - | "delivered" - | "failure" - | "pending" - | "returned" - | "shipped" - ) - | null; + status?: ("canceled" | "delivered" | "failure" | "pending" | "returned" | "shipped") | null; /** A tracking number for a card shipment. */ tracking_number?: string | null; /** A link to the shipping carrier's site where you can view detailed information about a card shipment. */ @@ -5077,13 +4919,7 @@ export interface components { )[] | null; /** The time interval or event with which to apply this spending limit towards. */ - interval: - | "all_time" - | "daily" - | "monthly" - | "per_authorization" - | "weekly" - | "yearly"; + interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; }; issuing_cardholder_address: { address: components["schemas"]["address"]; @@ -5676,9 +5512,7 @@ export interface components { )[] | null; /** Limit the spending with rules based on time intervals and categories. */ - spending_limits?: - | components["schemas"]["issuing_cardholder_spending_limit"][] - | null; + spending_limits?: components["schemas"]["issuing_cardholder_spending_limit"][] | null; /** Currency for the amounts within spending_limits. */ spending_limits_currency?: string | null; }; @@ -5694,17 +5528,13 @@ export interface components { }; issuing_cardholder_individual: { /** The date of birth of this cardholder. */ - dob?: Partial< - components["schemas"]["issuing_cardholder_individual_dob"] - > | null; + dob?: Partial | null; /** The first name of this cardholder. */ first_name: string; /** The last name of this cardholder. */ last_name: string; /** Government-issued ID document for this cardholder. */ - verification?: Partial< - components["schemas"]["issuing_cardholder_verification"] - > | null; + verification?: Partial | null; }; issuing_cardholder_individual_dob: { /** The day of birth, between 1 and 31. */ @@ -6027,30 +5857,18 @@ export interface components { )[] | null; /** The time interval or event with which to apply this spending limit towards. */ - interval: - | "all_time" - | "daily" - | "monthly" - | "per_authorization" - | "weekly" - | "yearly"; + interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; }; issuing_cardholder_verification: { /** An identifying document, either a passport or local ID card. */ - document?: Partial< - components["schemas"]["issuing_cardholder_id_document"] - > | null; + document?: Partial | null; }; legal_entity_company: { address?: components["schemas"]["address"]; /** The Kana variation of the company's primary address (Japan only). */ - address_kana?: Partial< - components["schemas"]["legal_entity_japan_address"] - > | null; + address_kana?: Partial | null; /** The Kanji variation of the company's primary address (Japan only). */ - address_kanji?: Partial< - components["schemas"]["legal_entity_japan_address"] - > | null; + address_kanji?: Partial | null; /** 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; /** 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. */ @@ -6089,9 +5907,7 @@ export interface components { /** Whether the company's business VAT number was provided. */ vat_id_provided?: boolean; /** Information on the verification state of the company. */ - verification?: Partial< - components["schemas"]["legal_entity_company_verification"] - > | null; + verification?: Partial | null; }; legal_entity_company_verification: { document: components["schemas"]["legal_entity_company_verification_document"]; @@ -6132,9 +5948,7 @@ export interface components { }; legal_entity_person_verification: { /** A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. */ - additional_document?: Partial< - components["schemas"]["legal_entity_person_verification_document"] - > | null; + additional_document?: Partial | null; /** 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; /** 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. */ @@ -6210,8 +6024,7 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "mandate"; /** ID of the payment method associated with this mandate. */ - payment_method: Partial & - Partial; + payment_method: Partial & Partial; payment_method_details: components["schemas"]["mandate_payment_method_details"]; single_use?: components["schemas"]["mandate_single_use"]; /** The status of the mandate, which indicates whether it can be used to initiate a payment. */ @@ -6279,9 +6092,7 @@ export interface components { /** 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; /** The ID of the payment used to pay for the order. Present if the order status is `paid`, `fulfilled`, or `refunded`. */ - charge?: - | (Partial & Partial) - | null; + charge?: (Partial & Partial) | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** 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). */ @@ -6326,9 +6137,7 @@ export interface components { /** 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; /** The timestamps at which the order status was updated. */ - status_transitions?: Partial< - components["schemas"]["status_transitions"] - > | null; + status_transitions?: Partial | null; /** Time at which the object was last updated. Measured in seconds since the Unix epoch. */ updated?: number | null; /** The user's order ID if it is different from the Stripe order ID. */ @@ -6378,13 +6187,9 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "order_return"; /** The order that this return includes items from. */ - order?: - | (Partial & Partial) - | null; + order?: (Partial & Partial) | null; /** The ID of the refund issued for this return. */ - refund?: - | (Partial & Partial) - | null; + refund?: (Partial & Partial) | null; }; package_dimensions: { /** Height, in inches. */ @@ -6417,9 +6222,7 @@ export interface components { /** Amount that was collected by this PaymentIntent. */ amount_received?: number; /** ID of the Connect application that created the PaymentIntent. */ - application?: - | (Partial & Partial) - | null; + application?: (Partial & Partial) | null; /** 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 | null; /** Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. */ @@ -6479,9 +6282,7 @@ export interface components { /** Unique identifier for the object. */ id: string; /** ID of the invoice that created this PaymentIntent, if it exists. */ - invoice?: - | (Partial & Partial) - | null; + invoice?: (Partial & Partial) | null; /** 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?: Partial | null; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -6489,31 +6290,21 @@ export interface components { /** Set of key-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]: string }; /** 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?: Partial< - components["schemas"]["payment_intent_next_action"] - > | null; + next_action?: Partial | null; /** String representing the object's type. Objects of the same type share the same value. */ object: "payment_intent"; /** 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?: - | (Partial & Partial) - | null; + on_behalf_of?: (Partial & Partial) | null; /** ID of the payment method used in this PaymentIntent. */ - payment_method?: - | (Partial & Partial) - | null; + payment_method?: (Partial & Partial) | null; /** Payment-method-specific configuration for this PaymentIntent. */ - payment_method_options?: Partial< - components["schemas"]["payment_intent_payment_method_options"] - > | null; + payment_method_options?: Partial | null; /** The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ payment_method_types: string[]; /** Email address that the receipt for the resulting payment will be sent to. */ receipt_email?: string | null; /** ID of the review associated with this PaymentIntent, if any. */ - review?: - | (Partial & Partial) - | null; + review?: (Partial & Partial) | null; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -6564,9 +6355,7 @@ export interface components { * * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). */ - installments?: Partial< - components["schemas"]["payment_method_options_card_installments"] - > | null; + installments?: Partial | null; /** 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. */ request_three_d_secure?: ("any" | "automatic" | "challenge_only") | null; }; @@ -6585,9 +6374,7 @@ export interface components { /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** 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?: - | (Partial & Partial) - | null; + customer?: (Partial & Partial) | null; fpx?: components["schemas"]["payment_method_fpx"]; /** Unique identifier for the object. */ id: string; @@ -6614,9 +6401,7 @@ export interface components { /** Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ brand: string; /** Checks on Card address and CVC if provided. */ - checks?: Partial< - components["schemas"]["payment_method_card_checks"] - > | null; + checks?: Partial | null; /** 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; /** Two-digit number representing the card's expiration month. */ @@ -6628,19 +6413,13 @@ export interface components { /** Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ funding: string; /** Details of the original PaymentMethod that created this object. */ - generated_from?: Partial< - components["schemas"]["payment_method_card_generated_card"] - > | null; + generated_from?: Partial | null; /** The last four digits of the card. */ last4: string; /** Contains details on how this Card maybe be used for 3D Secure authentication. */ - three_d_secure_usage?: Partial< - components["schemas"]["three_d_secure_usage"] - > | null; + three_d_secure_usage?: Partial | null; /** If this Card is part of a card wallet, this contains the details of the card wallet. */ - wallet?: Partial< - components["schemas"]["payment_method_card_wallet"] - > | null; + wallet?: Partial | null; }; payment_method_card_checks: { /** If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ @@ -6654,9 +6433,7 @@ export interface components { /** The charge that created this object. */ charge?: string | null; /** Transaction-specific details of the payment method used in the payment. */ - payment_method_details?: Partial< - components["schemas"]["payment_method_details"] - > | null; + payment_method_details?: Partial | null; }; payment_method_card_present: { [key: string]: any }; payment_method_card_wallet: { @@ -6668,13 +6445,7 @@ export interface components { masterpass?: components["schemas"]["payment_method_card_wallet_masterpass"]; samsung_pay?: components["schemas"]["payment_method_card_wallet_samsung_pay"]; /** 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. */ - type: - | "amex_express_checkout" - | "apple_pay" - | "google_pay" - | "masterpass" - | "samsung_pay" - | "visa_checkout"; + 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: { [key: string]: any }; @@ -6786,9 +6557,7 @@ export interface components { /** Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ brand?: string | null; /** Check results by Card networks on Card address and CVC at time of payment. */ - checks?: Partial< - components["schemas"]["payment_method_details_card_checks"] - > | null; + checks?: Partial | null; /** 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; /** Two-digit number representing the card's expiration month. */ @@ -6804,21 +6573,15 @@ export interface components { * * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). */ - installments?: Partial< - components["schemas"]["payment_method_details_card_installments"] - > | null; + installments?: Partial | null; /** The last four digits of the card. */ last4?: string | null; /** Identifies which network this charge was processed on. Can be `amex`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ network?: string | null; /** Populated if this transaction used 3D Secure authentication. */ - three_d_secure?: Partial< - components["schemas"]["three_d_secure_details"] - > | null; + three_d_secure?: Partial | null; /** If this Card is part of a card wallet, this contains the details of the card wallet. */ - wallet?: Partial< - components["schemas"]["payment_method_details_card_wallet"] - > | null; + wallet?: Partial | null; }; payment_method_details_card_checks: { /** If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ @@ -6830,9 +6593,7 @@ export interface components { }; payment_method_details_card_installments: { /** Installment plan selected for the payment. */ - plan?: Partial< - components["schemas"]["payment_method_details_card_installments_plan"] - > | null; + plan?: Partial | null; }; payment_method_details_card_installments_plan: { /** For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. */ @@ -6871,9 +6632,7 @@ export interface components { /** 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 | null; /** A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ - receipt?: Partial< - components["schemas"]["payment_method_details_card_present_receipt"] - > | null; + receipt?: Partial | null; }; payment_method_details_card_present_receipt: { /** EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ @@ -6902,18 +6661,10 @@ export interface components { masterpass?: components["schemas"]["payment_method_details_card_wallet_masterpass"]; samsung_pay?: components["schemas"]["payment_method_details_card_wallet_samsung_pay"]; /** 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. */ - type: - | "amex_express_checkout" - | "apple_pay" - | "google_pay" - | "masterpass" - | "samsung_pay" - | "visa_checkout"; + 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: { - [key: string]: any; - }; + payment_method_details_card_wallet_amex_express_checkout: { [key: string]: any }; payment_method_details_card_wallet_apple_pay: { [key: string]: any }; payment_method_details_card_wallet_google_pay: { [key: string]: any }; payment_method_details_card_wallet_masterpass: { @@ -7137,15 +6888,11 @@ export interface components { }; payment_method_options_card_installments: { /** Installment plans that may be selected for this PaymentIntent. */ - available_plans?: - | components["schemas"]["payment_method_details_card_installments_plan"][] - | null; + available_plans?: components["schemas"]["payment_method_details_card_installments_plan"][] | null; /** Whether Installments are enabled for this PaymentIntent. */ enabled: boolean; /** Installment plan selected for this PaymentIntent. */ - plan?: Partial< - components["schemas"]["payment_method_details_card_installments_plan"] - > | null; + plan?: Partial | null; }; payment_method_sepa_debit: { /** Bank code of bank associated with the bank account. */ @@ -7428,10 +7175,7 @@ export interface components { /** 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; /** ID of the balance transaction that describes the impact of this payout on your account balance. */ - balance_transaction?: - | (Partial & - Partial) - | null; + balance_transaction?: (Partial & Partial) | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** 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). */ @@ -7447,10 +7191,7 @@ export interface components { Partial) | null; /** 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?: - | (Partial & - Partial) - | null; + failure_balance_transaction?: (Partial & Partial) | null; /** 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; /** Message to user further explaining reason for payout failure if available. */ @@ -7488,12 +7229,8 @@ export interface components { person: { account: string; address?: components["schemas"]["address"]; - address_kana?: Partial< - components["schemas"]["legal_entity_japan_address"] - > | null; - address_kanji?: Partial< - components["schemas"]["legal_entity_japan_address"] - > | null; + address_kana?: Partial | null; + address_kanji?: Partial | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; dob?: components["schemas"]["legal_entity_dob"]; @@ -7515,9 +7252,7 @@ export interface components { object: "person"; phone?: string | null; relationship?: components["schemas"]["person_relationship"]; - requirements?: Partial< - components["schemas"]["person_requirements"] - > | null; + requirements?: Partial | null; ssn_last_4_provided?: boolean; verification?: components["schemas"]["legal_entity_person_verification"]; }; @@ -7559,9 +7294,7 @@ export interface components { /** Whether the plan can be used for new purchases. */ active: boolean; /** 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`. */ - aggregate_usage?: - | ("last_during_period" | "last_ever" | "max" | "sum") - | null; + aggregate_usage?: ("last_during_period" | "last_ever" | "max" | "sum") | null; /** The amount in %s to be charged on the interval specified. */ amount?: number | null; /** Same as `amount`, but contains a decimal value with at most 12 decimal places. */ @@ -7597,9 +7330,7 @@ export interface components { /** 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. */ tiers_mode?: ("graduated" | "volume") | null; /** Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. */ - transform_usage?: Partial< - components["schemas"]["transform_usage"] - > | null; + transform_usage?: Partial | null; /** 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; /** 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`. */ @@ -7665,9 +7396,7 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "product"; /** The dimensions of this product for shipping purposes. A SKU associated with this product can override this value by having its own `package_dimensions`. Only applicable to products of `type=good`. */ - package_dimensions?: Partial< - components["schemas"]["package_dimensions"] - > | null; + package_dimensions?: Partial | null; /** Whether this product is a shipped good. Only applicable to products of `type=good`. */ shippable?: boolean | null; /** 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. */ @@ -7817,9 +7546,7 @@ export interface components { /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** The default card to use for creating transfers to this recipient. */ - default_card?: - | (Partial & Partial) - | null; + default_card?: (Partial & Partial) | null; /** An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string | null; email?: string | null; @@ -7830,15 +7557,12 @@ export interface components { /** Set of key-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]: string }; /** 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?: - | (Partial & Partial) - | null; + migrated_to?: (Partial & Partial) | null; /** Full, legal name of the recipient. */ name?: string | null; /** String representing the object's type. Objects of the same type share the same value. */ object: "recipient"; - rolled_back_from?: Partial & - Partial; + rolled_back_from?: Partial & Partial; /** Type of the recipient, one of `individual` or `corporation`. */ type: string; }; @@ -7853,14 +7577,9 @@ export interface components { /** Amount, in %s. */ amount: number; /** Balance transaction that describes the impact on your account balance. */ - balance_transaction?: - | (Partial & - Partial) - | null; + balance_transaction?: (Partial & Partial) | null; /** ID of the charge that was refunded. */ - charge?: - | (Partial & Partial) - | null; + charge?: (Partial & Partial) | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** 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). */ @@ -7868,8 +7587,7 @@ export interface components { /** An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only) */ description?: string; /** If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. */ - failure_balance_transaction?: Partial & - Partial; + failure_balance_transaction?: Partial & Partial; /** 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; /** Unique identifier for the object. */ @@ -7879,25 +7597,17 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "refund"; /** ID of the PaymentIntent that was refunded. */ - payment_intent?: - | (Partial & Partial) - | null; + payment_intent?: (Partial & Partial) | null; /** Reason for the refund, either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). */ reason?: string | null; /** This is the transaction number that appears on email receipts sent for this refund. */ receipt_number?: string | null; /** 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?: - | (Partial & - Partial) - | null; + source_transfer_reversal?: (Partial & Partial) | null; /** 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; /** If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter. */ - transfer_reversal?: - | (Partial & - Partial) - | null; + transfer_reversal?: (Partial & Partial) | null; }; /** * The Report Run object represents an instance of a report type generated with @@ -7994,13 +7704,9 @@ export interface components { /** The ZIP or postal code of the card used, if applicable. */ billing_zip?: string | null; /** The charge associated with this review. */ - charge?: - | (Partial & Partial) - | null; + charge?: (Partial & Partial) | null; /** The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, or `disputed`. */ - closed_reason?: - | ("approved" | "disputed" | "refunded" | "refunded_as_fraud") - | null; + closed_reason?: ("approved" | "disputed" | "refunded" | "refunded_as_fraud") | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** Unique identifier for the object. */ @@ -8008,9 +7714,7 @@ export interface components { /** The IP address where the payment originated. */ ip_address?: string | null; /** 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?: Partial< - components["schemas"]["radar_review_resource_location"] - > | null; + ip_address_location?: Partial | null; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** String representing the object's type. Objects of the same type share the same value. */ @@ -8020,14 +7724,11 @@ export interface components { /** The reason the review was opened. One of `rule` or `manual`. */ opened_reason: "manual" | "rule"; /** The PaymentIntent ID associated with this review, if one exists. */ - payment_intent?: Partial & - Partial; + payment_intent?: Partial & Partial; /** The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, or `disputed`. */ reason: string; /** Information related to the browsing session of the user who initiated the payment. */ - session?: Partial< - components["schemas"]["radar_review_resource_session"] - > | null; + session?: Partial | null; }; rule: { /** The action taken on the payment. */ @@ -8092,13 +7793,9 @@ export interface components { */ setup_intent: { /** ID of the Connect application that created the SetupIntent. */ - application?: - | (Partial & Partial) - | null; + application?: (Partial & Partial) | null; /** Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. */ - cancellation_reason?: - | ("abandoned" | "duplicate" | "requested_by_customer") - | null; + cancellation_reason?: ("abandoned" | "duplicate" | "requested_by_customer") | null; /** * The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. * @@ -8126,35 +7823,23 @@ export interface components { /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** ID of the multi use Mandate generated by the SetupIntent. */ - mandate?: - | (Partial & Partial) - | null; + mandate?: (Partial & Partial) | null; /** Set of key-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]: string }; /** If present, this property tells you what actions you need to take in order for your customer to continue payment setup. */ - next_action?: Partial< - components["schemas"]["setup_intent_next_action"] - > | null; + next_action?: Partial | null; /** String representing the object's type. Objects of the same type share the same value. */ object: "setup_intent"; /** The account (if any) for which the setup is intended. */ - on_behalf_of?: - | (Partial & Partial) - | null; + on_behalf_of?: (Partial & Partial) | null; /** ID of the payment method used with this SetupIntent. */ - payment_method?: - | (Partial & Partial) - | null; + payment_method?: (Partial & Partial) | null; /** Payment-method-specific configuration for this SetupIntent. */ - payment_method_options?: Partial< - components["schemas"]["setup_intent_payment_method_options"] - > | null; + payment_method_options?: Partial | null; /** The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. */ payment_method_types: string[]; /** ID of the single_use Mandate generated by the SetupIntent. */ - single_use_mandate?: - | (Partial & Partial) - | null; + single_use_mandate?: (Partial & Partial) | null; /** [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`. */ status: | "canceled" @@ -8207,9 +7892,7 @@ export interface components { /** 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; /** The estimated delivery date for the given shipping method. Can be either a specific date or a range. */ - delivery_estimate?: Partial< - components["schemas"]["delivery_estimate"] - > | null; + delivery_estimate?: Partial | null; /** An arbitrary string attached to the object. Often useful for displaying to users. */ description: string; /** Unique identifier for the object. */ @@ -8250,9 +7933,7 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "sku"; /** The dimensions of this SKU for shipping purposes. */ - package_dimensions?: Partial< - components["schemas"]["package_dimensions"] - > | null; + package_dimensions?: Partial | null; /** 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; /** The ID of the product this SKU is associated with. The product must be currently active. */ @@ -8744,9 +8425,7 @@ export interface components { /** 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; /** Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ - billing_thresholds?: Partial< - components["schemas"]["subscription_billing_thresholds"] - > | null; + billing_thresholds?: Partial | null; /** A date in the future at which the subscription will automatically get canceled */ cancel_at?: number | null; /** 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. */ @@ -8768,9 +8447,7 @@ export interface components { /** 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; /** 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?: - | (Partial & Partial) - | null; + default_payment_method?: (Partial & Partial) | null; /** 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?: | (Partial & @@ -8800,9 +8477,7 @@ export interface components { url: string; }; /** The most recent invoice this subscription has generated. */ - latest_invoice?: - | (Partial & Partial) - | null; + latest_invoice?: (Partial & Partial) | null; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -8812,30 +8487,21 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "subscription"; /** If specified, payment collection for this subscription will be paused. */ - pause_collection?: Partial< - components["schemas"]["subscriptions_resource_pause_collection"] - > | null; + pause_collection?: Partial | null; /** 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?: Partial< components["schemas"]["subscription_pending_invoice_item_interval"] > | null; /** 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?: - | (Partial & Partial) - | null; + pending_setup_intent?: (Partial & Partial) | null; /** 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?: Partial< - components["schemas"]["subscriptions_resource_pending_update"] - > | null; + pending_update?: Partial | null; /** Hash describing the plan the customer is subscribed to. Only set if the subscription contains a single plan. */ plan?: Partial | null; /** 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 | null; /** The schedule attached to the subscription */ - schedule?: - | (Partial & - Partial) - | null; + schedule?: (Partial & Partial) | null; /** Date when the subscription was first created. The date might differ from the `created` date due to backdating. */ start_date: number; /** @@ -8849,14 +8515,7 @@ export interface components { * * 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. */ - status: - | "active" - | "canceled" - | "incomplete" - | "incomplete_expired" - | "past_due" - | "trialing" - | "unpaid"; + status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "trialing" | "unpaid"; /** If provided, each invoice created by this subscription will apply the tax rate, increasing the amount billed to the customer. */ tax_percent?: number | null; /** If the subscription has a trial, the end of that trial. */ @@ -8876,9 +8535,7 @@ export interface components { */ subscription_item: { /** Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period */ - billing_thresholds?: Partial< - components["schemas"]["subscription_item_billing_thresholds"] - > | null; + billing_thresholds?: Partial | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** Unique identifier for the object. */ @@ -8918,9 +8575,7 @@ export interface components { /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. */ - current_phase?: Partial< - components["schemas"]["subscription_schedule_current_phase"] - > | null; + current_phase?: Partial | null; /** ID of the customer who owns the subscription schedule. */ customer: Partial & Partial & @@ -8945,20 +8600,14 @@ export interface components { /** 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). */ status: "active" | "canceled" | "completed" | "not_started" | "released"; /** ID of the subscription managed by the subscription schedule. */ - subscription?: - | (Partial & Partial) - | null; + subscription?: (Partial & Partial) | null; }; /** A phase item describes the plan and quantity of a phase. */ subscription_schedule_configuration_item: { /** Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period */ - billing_thresholds?: Partial< - components["schemas"]["subscription_item_billing_thresholds"] - > | null; + billing_thresholds?: Partial | null; /** ID of the plan to which the customer should be subscribed. */ - plan: Partial & - Partial & - Partial; + plan: Partial & Partial & Partial; /** Quantity of the plan to which the customer should be subscribed. */ quantity?: number; /** 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`. */ @@ -8975,9 +8624,7 @@ export interface components { /** 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; /** Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ - billing_thresholds?: Partial< - components["schemas"]["subscription_billing_thresholds"] - > | null; + billing_thresholds?: Partial | null; /** 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. */ collection_method?: ("charge_automatically" | "send_invoice") | null; /** ID of the coupon to use during this phase of the subscription schedule. */ @@ -8987,23 +8634,17 @@ export interface components { Partial) | null; /** 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?: - | (Partial & Partial) - | null; + default_payment_method?: (Partial & Partial) | null; /** The default tax rates to apply to the subscription during this phase of the subscription schedule. */ default_tax_rates?: components["schemas"]["tax_rate"][] | null; /** The end of this phase of the subscription schedule. */ end_date: number; /** The subscription schedule's default invoice settings. */ - invoice_settings?: Partial< - components["schemas"]["invoice_setting_subscription_schedule_setting"] - > | null; + invoice_settings?: Partial | null; /** Plans to subscribe during this phase of the subscription schedule. */ plans: components["schemas"]["subscription_schedule_configuration_item"][]; /** Controls whether or not the subscription schedule will prorate when transitioning to this phase. Values are `create_prorations` and `none`. */ - proration_behavior?: - | ("always_invoice" | "create_prorations" | "none") - | null; + proration_behavior?: ("always_invoice" | "create_prorations" | "none") | null; /** The start of this phase of the subscription schedule. */ start_date: number; /** If provided, each invoice created during this phase of the subscription schedule will apply the tax rate, increasing the amount billed to the customer. */ @@ -9013,19 +8654,13 @@ export interface components { }; subscription_schedules_resource_default_settings: { /** Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ - billing_thresholds?: Partial< - components["schemas"]["subscription_billing_thresholds"] - > | null; + billing_thresholds?: Partial | null; /** 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. */ collection_method?: ("charge_automatically" | "send_invoice") | null; /** 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?: - | (Partial & Partial) - | null; + default_payment_method?: (Partial & Partial) | null; /** The subscription schedule's default invoice settings. */ - invoice_settings?: Partial< - components["schemas"]["invoice_setting_subscription_schedule_setting"] - > | null; + invoice_settings?: Partial | null; }; /** * The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription @@ -9302,10 +8937,7 @@ export interface components { /** Amount transferred. */ amount: number; /** 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?: - | (Partial & - Partial) - | null; + balance_transaction?: (Partial & Partial) | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** 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). */ @@ -9352,10 +8984,7 @@ export interface components { /** Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). */ amount_reversed: number; /** Balance transaction that describes the impact of this transfer on your account balance. */ - balance_transaction?: - | (Partial & - Partial) - | null; + balance_transaction?: (Partial & Partial) | null; /** Time that this record of the transfer was first created. */ created: number; /** 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). */ @@ -9363,12 +8992,9 @@ export interface components { /** An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string | null; /** ID of the Stripe account the transfer was sent to. */ - destination?: - | (Partial & Partial) - | null; + destination?: (Partial & Partial) | null; /** 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?: Partial & - Partial; + destination_payment?: Partial & Partial; /** Unique identifier for the object. */ id: string; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -9391,9 +9017,7 @@ export interface components { /** Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. */ reversed: boolean; /** 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?: - | (Partial & Partial) - | null; + source_transaction?: (Partial & Partial) | null; /** The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. */ source_type?: string | null; /** 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. */ @@ -9428,18 +9052,13 @@ export interface components { /** Amount, in %s. */ amount: number; /** Balance transaction that describes the impact on your account balance. */ - balance_transaction?: - | (Partial & - Partial) - | null; + balance_transaction?: (Partial & Partial) | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** 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; /** Linked payment refund for the transfer reversal. */ - destination_payment_refund?: - | (Partial & Partial) - | null; + destination_payment_refund?: (Partial & Partial) | null; /** Unique identifier for the object. */ id: 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. */ @@ -9447,9 +9066,7 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "transfer_reversal"; /** ID of the refund responsible for the transfer reversal. */ - source_refund?: - | (Partial & Partial) - | null; + source_refund?: (Partial & Partial) | null; /** ID of the transfer that was reversed. */ transfer: Partial & Partial; }; @@ -9548,27 +9165,33 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["three_d_secure"]; + content: { + "application/json": components["schemas"]["three_d_secure"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Amount of the charge that you will create when authentication completes. */ - amount: number; - /** The ID of a card token, or the ID of a card belonging to the given customer. */ - card?: string; - /** 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; - /** The customer associated with this 3D secure authentication. */ - customer?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** The URL that the cardholder's browser will be returned to when authentication completes. */ - return_url: string; + content: { + "application/x-www-form-urlencoded": { + /** Amount of the charge that you will create when authentication completes. */ + amount: number; + /** The ID of a card token, or the ID of a card belonging to the given customer. */ + card?: string; + /** 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; + /** The customer associated with this 3D secure authentication. */ + customer?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The URL that the cardholder's browser will be returned to when authentication completes. */ + return_url: string; + }; }; }; }; @@ -9586,15 +9209,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["three_d_secure"]; + content: { + "application/json": components["schemas"]["three_d_secure"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Retrieves the details of an account.

*/ @@ -9608,15 +9237,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["account"]; + content: { + "application/json": components["schemas"]["account"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /** @@ -9628,227 +9263,222 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["account"]; + content: { + "application/json": components["schemas"]["account"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ - account_token?: string; - /** 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?: Partial<{ - account_holder_name?: string; - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - object?: "bank_account"; - routing_number?: string; - }> & - Partial; - /** 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; - }; - /** The business type. */ - business_type?: - | "company" - | "government_entity" - | "individual" - | "non_profit"; - /** Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`. */ - company?: { - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - address_kana?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - address_kanji?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; + content: { + "application/x-www-form-urlencoded": { + /** An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ + account_token?: string; + /** 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?: Partial<{ + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + }> & + Partial; + /** 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; }; - directors_provided?: boolean; - executives_provided?: boolean; - name?: string; - name_kana?: string; - name_kanji?: string; - owners_provided?: boolean; - phone?: 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?: { - document?: { - back?: string; - front?: string; + /** The business type. */ + business_type?: "company" | "government_entity" | "individual" | "non_profit"; + /** Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`. */ + company?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + 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; + 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?: { + document?: { + back?: string; + front?: string; + }; }; }; - }; - /** 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; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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; - /** Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. */ - individual?: { - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - address_kana?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - address_kanji?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - dob?: Partial<{ - day: number; - month: number; - year: number; - }> & - Partial<"">; + /** 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; + /** 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; - 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?: Partial<{ [key: string]: string }> & Partial<"">; - phone?: string; - ssn_last_4?: string; - verification?: { - additional_document?: { - back?: string; - front?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. */ + individual?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; }; - document?: { - back?: string; - front?: string; + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** 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" - | "legacy_payments" - | "tax_reporting_us_1099_k" - | "tax_reporting_us_1099_misc" - | "transfers" - )[]; - /** Options for customizing how the account functions within Stripe. */ - settings?: { - branding?: { - icon?: string; - logo?: string; - primary_color?: string; - secondary_color?: string; - }; - card_payments?: { - decline_on?: { - avs_failure?: boolean; - cvc_failure?: boolean; + address_kanji?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + dob?: Partial<{ + day: number; + month: number; + year: number; + }> & + Partial<"">; + 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?: Partial<{ [key: string]: string }> & Partial<"">; + phone?: string; + ssn_last_4?: string; + verification?: { + additional_document?: { + back?: string; + front?: string; + }; + document?: { + back?: string; + front?: string; + }; }; - statement_descriptor_prefix?: string; - }; - payments?: { - statement_descriptor?: string; - statement_descriptor_kana?: string; - statement_descriptor_kanji?: string; }; - payouts?: { - debit_negative_balances?: boolean; - schedule?: { - delay_days?: Partial<"minimum"> & Partial; - interval?: "daily" | "manual" | "monthly" | "weekly"; - monthly_anchor?: number; - weekly_anchor?: - | "friday" - | "monday" - | "saturday" - | "sunday" - | "thursday" - | "tuesday" - | "wednesday"; + /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; + /** 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" + | "legacy_payments" + | "tax_reporting_us_1099_k" + | "tax_reporting_us_1099_misc" + | "transfers" + )[]; + /** Options for customizing how the account functions within Stripe. */ + settings?: { + branding?: { + icon?: string; + logo?: string; + primary_color?: string; + secondary_color?: string; + }; + card_payments?: { + decline_on?: { + avs_failure?: boolean; + cvc_failure?: boolean; + }; + statement_descriptor_prefix?: string; + }; + payments?: { + statement_descriptor?: string; + statement_descriptor_kana?: string; + statement_descriptor_kanji?: string; + }; + payouts?: { + debit_negative_balances?: boolean; + schedule?: { + delay_days?: Partial<"minimum"> & Partial; + interval?: "daily" | "manual" | "monthly" | "weekly"; + monthly_anchor?: number; + weekly_anchor?: "friday" | "monday" | "saturday" | "sunday" | "thursday" | "tuesday" | "wednesday"; + }; + statement_descriptor?: string; }; - statement_descriptor?: string; }; - }; - /** 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; + /** 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; + }; }; }; }; @@ -9864,16 +9494,22 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_account"]; + content: { + "application/json": components["schemas"]["deleted_account"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - account?: string; + content: { + "application/x-www-form-urlencoded": { + account?: string; + }; }; }; }; @@ -9882,34 +9518,40 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["external_account"]; + content: { + "application/json": components["schemas"]["external_account"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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?: Partial<{ - account_holder_name?: string; - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - object?: "bank_account"; - routing_number?: string; - }> & - Partial; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - external_account?: 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?: { [key: string]: string }; + content: { + "application/x-www-form-urlencoded": { + /** 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?: Partial<{ + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + }> & + Partial; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + external_account?: 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?: { [key: string]: string }; + }; }; }; }; @@ -9927,15 +9569,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["external_account"]; + content: { + "application/json": components["schemas"]["external_account"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /** @@ -9951,43 +9599,49 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["external_account"]; + content: { + "application/json": components["schemas"]["external_account"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** The name of the person or business that owns the bank account. */ - account_holder_name?: string; - /** The type of entity that holds the account. This can be either `individual` or `company`. */ - account_holder_type?: "" | "company" | "individual"; - /** City/District/Suburb/Town/Village. */ - address_city?: string; - /** Billing address country, if provided when creating card. */ - address_country?: string; - /** Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string; - /** Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string; - /** State/County/Province/Region. */ - address_state?: string; - /** ZIP or postal code. */ - address_zip?: string; - /** When set to true, this becomes the default external account for its currency. */ - default_for_currency?: boolean; - /** Two digit number representing the card’s expiration month. */ - exp_month?: string; - /** Four digit number representing the card’s expiration year. */ - exp_year?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** Cardholder name. */ - name?: string; + content: { + "application/x-www-form-urlencoded": { + /** The name of the person or business that owns the bank account. */ + account_holder_name?: string; + /** The type of entity that holds the account. This can be either `individual` or `company`. */ + account_holder_type?: "" | "company" | "individual"; + /** City/District/Suburb/Town/Village. */ + address_city?: string; + /** Billing address country, if provided when creating card. */ + address_country?: string; + /** Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string; + /** Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string; + /** State/County/Province/Region. */ + address_state?: string; + /** ZIP or postal code. */ + address_zip?: string; + /** When set to true, this becomes the default external account for its currency. */ + default_for_currency?: boolean; + /** Two digit number representing the card’s expiration month. */ + exp_month?: string; + /** Four digit number representing the card’s expiration year. */ + exp_year?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** Cardholder name. */ + name?: string; + }; }; }; }; @@ -10001,15 +9655,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_external_account"]; + content: { + "application/json": components["schemas"]["deleted_external_account"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -10023,23 +9683,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["capability"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["capability"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Retrieves information about the specified Account Capability.

*/ @@ -10056,15 +9722,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["capability"]; + content: { + "application/json": components["schemas"]["capability"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Updates an existing Account Capability.

*/ @@ -10077,19 +9749,25 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["capability"]; + content: { + "application/json": components["schemas"]["capability"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + }; }; }; }; @@ -10110,25 +9788,30 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - /** The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ - data: (Partial & - Partial)[]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + /** The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ + data: (Partial & Partial)[]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Create an external account for a given account.

*/ @@ -10136,34 +9819,40 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["external_account"]; + content: { + "application/json": components["schemas"]["external_account"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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?: Partial<{ - account_holder_name?: string; - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - object?: "bank_account"; - routing_number?: string; - }> & - Partial; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - external_account?: 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?: { [key: string]: string }; + content: { + "application/x-www-form-urlencoded": { + /** 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?: Partial<{ + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + }> & + Partial; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + external_account?: 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?: { [key: string]: string }; + }; }; }; }; @@ -10181,15 +9870,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["external_account"]; + content: { + "application/json": components["schemas"]["external_account"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /** @@ -10205,44 +9900,50 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["external_account"]; + content: { + "application/json": components["schemas"]["external_account"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** The name of the person or business that owns the bank account. */ - account_holder_name?: string; - /** The type of entity that holds the account. This can be either `individual` or `company`. */ - account_holder_type?: "" | "company" | "individual"; - /** City/District/Suburb/Town/Village. */ - address_city?: string; - /** Billing address country, if provided when creating card. */ - address_country?: string; - /** Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string; - /** Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string; - /** State/County/Province/Region. */ - address_state?: string; - /** ZIP or postal code. */ - address_zip?: string; - /** When set to true, this becomes the default external account for its currency. */ - default_for_currency?: boolean; - /** Two digit number representing the card’s expiration month. */ - exp_month?: string; - /** Four digit number representing the card’s expiration year. */ - exp_year?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** Cardholder name. */ - name?: string; - }; + content: { + "application/x-www-form-urlencoded": { + /** The name of the person or business that owns the bank account. */ + account_holder_name?: string; + /** The type of entity that holds the account. This can be either `individual` or `company`. */ + account_holder_type?: "" | "company" | "individual"; + /** City/District/Suburb/Town/Village. */ + address_city?: string; + /** Billing address country, if provided when creating card. */ + address_country?: string; + /** Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string; + /** Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string; + /** State/County/Province/Region. */ + address_state?: string; + /** ZIP or postal code. */ + address_zip?: string; + /** When set to true, this becomes the default external account for its currency. */ + default_for_currency?: boolean; + /** Two digit number representing the card’s expiration month. */ + exp_month?: string; + /** Four digit number representing the card’s expiration year. */ + exp_year?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** Cardholder name. */ + name?: string; + }; + }; }; }; /**

Delete a specified external account for a given account.

*/ @@ -10255,15 +9956,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_external_account"]; + content: { + "application/json": components["schemas"]["deleted_external_account"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /** @@ -10275,20 +9982,26 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["login_link"]; + content: { + "application/json": components["schemas"]["login_link"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - account: string; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** Where to redirect the user after they log out of their dashboard. */ - redirect_url?: string; + content: { + "application/x-www-form-urlencoded": { + account: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Where to redirect the user after they log out of their dashboard. */ + redirect_url?: string; + }; }; }; }; @@ -10301,18 +10014,24 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["light_account_logout"]; + content: { + "application/json": components["schemas"]["light_account_logout"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - account: string; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + content: { + "application/x-www-form-urlencoded": { + account: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; }; }; }; @@ -10340,23 +10059,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["person"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["person"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Creates a new person.

*/ @@ -10364,100 +10089,106 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["person"]; + content: { + "application/json": components["schemas"]["person"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - account?: string; - /** The person's address. */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - /** 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; - }; - /** 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; - }; - /** The person's date of birth. */ - dob?: Partial<{ - day: number; - month: number; - year: number; - }> & - Partial<"">; - /** The person's email address. */ - email?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** The person's first name. */ - first_name?: string; - /** The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string; - /** The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string; - /** The person's gender (International regulations require either "male" or "female"). */ - gender?: string; - /** 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; - /** The person's last name. */ - last_name?: string; - /** The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string; - /** The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string; - /** The person's maiden name. */ - maiden_name?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string; - /** The person's phone number. */ - phone?: string; - /** The relationship that this person has with the account's legal entity. */ - relationship?: { - director?: boolean; - executive?: boolean; - owner?: boolean; - percent_ownership?: Partial & Partial<"">; - representative?: boolean; - title?: string; - }; - /** The last 4 digits of the person's social security number. */ - ssn_last_4?: string; - /** The person's verification status. */ - verification?: { - additional_document?: { - back?: string; - front?: string; + content: { + "application/x-www-form-urlencoded": { + account?: string; + /** The person's address. */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + /** 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; + }; + /** 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; + }; + /** The person's date of birth. */ + dob?: Partial<{ + day: number; + month: number; + year: number; + }> & + Partial<"">; + /** The person's email address. */ + email?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The person's first name. */ + first_name?: string; + /** The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string; + /** The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string; + /** The person's gender (International regulations require either "male" or "female"). */ + gender?: string; + /** 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; + /** The person's last name. */ + last_name?: string; + /** The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string; + /** The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string; + /** The person's maiden name. */ + maiden_name?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string; + /** The person's phone number. */ + phone?: string; + /** The relationship that this person has with the account's legal entity. */ + relationship?: { + director?: boolean; + executive?: boolean; + owner?: boolean; + percent_ownership?: Partial & Partial<"">; + representative?: boolean; + title?: string; }; - document?: { - back?: string; - front?: string; + /** The last 4 digits of the person's social security number. */ + ssn_last_4?: string; + /** The person's verification status. */ + verification?: { + additional_document?: { + back?: string; + front?: string; + }; + document?: { + back?: string; + front?: string; + }; }; }; }; @@ -10477,15 +10208,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["person"]; + content: { + "application/json": components["schemas"]["person"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Updates an existing person.

*/ @@ -10498,100 +10235,106 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["person"]; + content: { + "application/json": components["schemas"]["person"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - account?: string; - /** The person's address. */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - /** 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; - }; - /** 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; - }; - /** The person's date of birth. */ - dob?: Partial<{ - day: number; - month: number; - year: number; - }> & - Partial<"">; - /** The person's email address. */ - email?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** The person's first name. */ - first_name?: string; - /** The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string; - /** The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string; - /** The person's gender (International regulations require either "male" or "female"). */ - gender?: string; - /** 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; - /** The person's last name. */ - last_name?: string; - /** The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string; - /** The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string; - /** The person's maiden name. */ - maiden_name?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string; - /** The person's phone number. */ - phone?: string; - /** The relationship that this person has with the account's legal entity. */ - relationship?: { - director?: boolean; - executive?: boolean; - owner?: boolean; - percent_ownership?: Partial & Partial<"">; - representative?: boolean; - title?: string; - }; - /** The last 4 digits of the person's social security number. */ - ssn_last_4?: string; - /** The person's verification status. */ - verification?: { - additional_document?: { - back?: string; - front?: string; + content: { + "application/x-www-form-urlencoded": { + account?: string; + /** The person's address. */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + /** 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; + }; + /** 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; + }; + /** The person's date of birth. */ + dob?: Partial<{ + day: number; + month: number; + year: number; + }> & + Partial<"">; + /** The person's email address. */ + email?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The person's first name. */ + first_name?: string; + /** The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string; + /** The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string; + /** The person's gender (International regulations require either "male" or "female"). */ + gender?: string; + /** 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; + /** The person's last name. */ + last_name?: string; + /** The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string; + /** The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string; + /** The person's maiden name. */ + maiden_name?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string; + /** The person's phone number. */ + phone?: string; + /** The relationship that this person has with the account's legal entity. */ + relationship?: { + director?: boolean; + executive?: boolean; + owner?: boolean; + percent_ownership?: Partial & Partial<"">; + representative?: boolean; + title?: string; }; - document?: { - back?: string; - front?: string; + /** The last 4 digits of the person's social security number. */ + ssn_last_4?: string; + /** The person's verification status. */ + verification?: { + additional_document?: { + back?: string; + front?: string; + }; + document?: { + back?: string; + front?: string; + }; }; }; }; @@ -10607,15 +10350,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_person"]; + content: { + "application/json": components["schemas"]["deleted_person"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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.

*/ @@ -10642,23 +10391,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["person"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["person"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Creates a new person.

*/ @@ -10666,242 +10421,118 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["person"]; + content: { + "application/json": components["schemas"]["person"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - account?: string; - /** The person's address. */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - /** 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; - }; - /** 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; - }; - /** The person's date of birth. */ - dob?: Partial<{ - day: number; - month: number; - year: number; - }> & - Partial<"">; - /** The person's email address. */ - email?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** The person's first name. */ - first_name?: string; - /** The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string; - /** The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string; - /** The person's gender (International regulations require either "male" or "female"). */ - gender?: string; - /** 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; - /** The person's last name. */ - last_name?: string; - /** The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string; - /** The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string; - /** The person's maiden name. */ - maiden_name?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string; - /** The person's phone number. */ - phone?: string; - /** The relationship that this person has with the account's legal entity. */ - relationship?: { - director?: boolean; - executive?: boolean; - owner?: boolean; - percent_ownership?: Partial & Partial<"">; - representative?: boolean; - title?: string; - }; - /** The last 4 digits of the person's social security number. */ - ssn_last_4?: string; - /** The person's verification status. */ - verification?: { - additional_document?: { - back?: string; - front?: string; + content: { + "application/x-www-form-urlencoded": { + account?: string; + /** The person's address. */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; }; - document?: { - back?: string; - front?: string; + /** 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; }; - }; - }; - }; - }; - /**

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: { - "application/json": components["schemas"]["person"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /**

Updates an existing person.

*/ - PostAccountPersonsPerson: { - parameters: { - path: { - person: string; - }; - }; - responses: { - /** Successful response. */ - 200: { - "application/json": components["schemas"]["person"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { - account?: string; - /** The person's address. */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - /** 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; - }; - /** 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; - }; - /** The person's date of birth. */ - dob?: Partial<{ - day: number; - month: number; - year: number; - }> & - Partial<"">; - /** The person's email address. */ - email?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** The person's first name. */ - first_name?: string; - /** The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string; - /** The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string; - /** The person's gender (International regulations require either "male" or "female"). */ - gender?: string; - /** 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; - /** The person's last name. */ - last_name?: string; - /** The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string; - /** The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string; - /** The person's maiden name. */ - maiden_name?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string; - /** The person's phone number. */ - phone?: string; - /** The relationship that this person has with the account's legal entity. */ - relationship?: { - director?: boolean; - executive?: boolean; - owner?: boolean; - percent_ownership?: Partial & Partial<"">; - representative?: boolean; - title?: string; - }; - /** The last 4 digits of the person's social security number. */ - ssn_last_4?: string; - /** The person's verification status. */ - verification?: { - additional_document?: { - back?: string; - front?: string; + /** 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; + }; + /** The person's date of birth. */ + dob?: Partial<{ + day: number; + month: number; + year: number; + }> & + Partial<"">; + /** The person's email address. */ + email?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The person's first name. */ + first_name?: string; + /** The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string; + /** The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string; + /** The person's gender (International regulations require either "male" or "female"). */ + gender?: string; + /** 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; + /** The person's last name. */ + last_name?: string; + /** The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string; + /** The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string; + /** The person's maiden name. */ + maiden_name?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string; + /** The person's phone number. */ + phone?: string; + /** The relationship that this person has with the account's legal entity. */ + relationship?: { + director?: boolean; + executive?: boolean; + owner?: boolean; + percent_ownership?: Partial & Partial<"">; + representative?: boolean; + title?: string; }; - document?: { - back?: string; - front?: string; + /** The last 4 digits of the person's social security number. */ + ssn_last_4?: string; + /** The person's verification status. */ + verification?: { + additional_document?: { + back?: string; + front?: string; + }; + 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: { + /**

Retrieves an existing person.

*/ + GetAccountPersonsPerson: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; path: { person: string; }; @@ -10909,212 +10540,49 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_person"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /**

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: { - responses: { - /** Successful response. */ - 200: { - "application/json": components["schemas"]["account_link"]; + content: { + "application/json": components["schemas"]["person"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** The identifier of the account to create an account link for. */ - account: string; - /** Which information the platform needs to collect from the user. One of `currently_due` or `eventually_due`. Default is `currently_due`. */ - collect?: "currently_due" | "eventually_due"; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** The URL that the user will be redirected to if the account link is no longer valid. */ - failure_url: string; - /** The URL that the user will be redirected to upon leaving or completing the linked flow successfully. */ - success_url: string; - /** The type of account link the user is requesting. Possible values are `custom_account_verification` or `custom_account_update`. */ - type: "custom_account_update" | "custom_account_verification"; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; - /**

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

*/ - GetAccounts: { + /**

Updates an existing person.

*/ + PostAccountPersonsPerson: { parameters: { - query: { - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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: { + person: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["account"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": components["schemas"]["person"]; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /** - *

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: { - responses: { - /** Successful response. */ - 200: { - "application/json": components["schemas"]["account"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ - account_token?: string; - /** 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?: Partial<{ - account_holder_name?: string; - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - object?: "bank_account"; - routing_number?: string; - }> & - Partial; - /** 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; - }; - /** The business type. */ - business_type?: - | "company" - | "government_entity" - | "individual" - | "non_profit"; - /** Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`. */ - company?: { - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - address_kana?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - 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; - 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?: { - document?: { - back?: string; - front?: string; - }; - }; - }; - /** 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; - /** 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; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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; - /** Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. */ - individual?: { + content: { + "application/x-www-form-urlencoded": { + account?: string; + /** The person's address. */ address?: { city?: string; country?: string; @@ -11123,6 +10591,7 @@ export interface operations { postal_code?: string; state?: string; }; + /** The Kana variation of the person's address (Japan only). */ address_kana?: { city?: string; country?: string; @@ -11132,6 +10601,7 @@ export interface operations { state?: string; town?: string; }; + /** The Kanji variation of the person's address (Japan only). */ address_kanji?: { city?: string; country?: string; @@ -11141,25 +10611,53 @@ export interface operations { state?: string; town?: string; }; + /** The person's date of birth. */ dob?: Partial<{ day: number; month: number; year: number; }> & Partial<"">; + /** The person's email address. */ email?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The person's first name. */ first_name?: string; + /** The Kana variation of the person's first name (Japan only). */ first_name_kana?: string; + /** The Kanji variation of the person's first name (Japan only). */ first_name_kanji?: string; + /** The person's gender (International regulations require either "male" or "female"). */ gender?: string; + /** 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; + /** The person's last name. */ last_name?: string; + /** The Kana variation of the person's last name (Japan only). */ last_name_kana?: string; + /** The Kanji variation of the person's last name (Japan only). */ last_name_kanji?: string; + /** The person's maiden name. */ maiden_name?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string; + /** The person's phone number. */ phone?: string; + /** The relationship that this person has with the account's legal entity. */ + relationship?: { + director?: boolean; + executive?: boolean; + owner?: boolean; + percent_ownership?: Partial & Partial<"">; + representative?: boolean; + title?: string; + }; + /** The last 4 digits of the person's social security number. */ ssn_last_4?: string; + /** The person's verification status. */ verification?: { additional_document?: { back?: string; @@ -11171,807 +10669,655 @@ export interface operations { }; }; }; - /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; - /** 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" - | "legacy_payments" - | "tax_reporting_us_1099_k" - | "tax_reporting_us_1099_misc" - | "transfers" - )[]; - /** Options for customizing how the account functions within Stripe. */ - settings?: { - branding?: { - icon?: string; - logo?: string; - primary_color?: string; - secondary_color?: string; - }; - card_payments?: { - decline_on?: { - avs_failure?: boolean; - cvc_failure?: boolean; - }; - statement_descriptor_prefix?: string; - }; - payments?: { - statement_descriptor?: string; - statement_descriptor_kana?: string; - statement_descriptor_kanji?: string; - }; - payouts?: { - debit_negative_balances?: boolean; - schedule?: { - delay_days?: Partial<"minimum"> & Partial; - interval?: "daily" | "manual" | "monthly" | "weekly"; - monthly_anchor?: number; - weekly_anchor?: - | "friday" - | "monday" - | "saturday" - | "sunday" - | "thursday" - | "tuesday" - | "wednesday"; - }; - statement_descriptor?: string; - }; - }; - /** 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; - }; - /** 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. */ - type?: "custom" | "express" | "standard"; }; }; }; - /**

Retrieves the details of an account.

*/ - GetAccountsAccount: { + /**

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: { - account: string; - }; - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + person: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["account"]; + content: { + "application/json": components["schemas"]["deleted_person"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /** - *

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; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; + }; + /**

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: { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["account"]; + content: { + "application/json": components["schemas"]["account_link"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ - account_token?: string; - /** 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?: Partial<{ - account_holder_name?: string; - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - object?: "bank_account"; - routing_number?: string; - }> & - Partial; - /** 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; + content: { + "application/x-www-form-urlencoded": { + /** The identifier of the account to create an account link for. */ + account: string; + /** Which information the platform needs to collect from the user. One of `currently_due` or `eventually_due`. Default is `currently_due`. */ + collect?: "currently_due" | "eventually_due"; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The URL that the user will be redirected to if the account link is no longer valid. */ + failure_url: string; + /** The URL that the user will be redirected to upon leaving or completing the linked flow successfully. */ + success_url: string; + /** The type of account link the user is requesting. Possible values are `custom_account_verification` or `custom_account_update`. */ + type: "custom_account_update" | "custom_account_verification"; }; - /** The business type. */ - business_type?: - | "company" - | "government_entity" - | "individual" - | "non_profit"; - /** Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`. */ - company?: { - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - address_kana?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - 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; - 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?: { - document?: { - back?: string; - front?: string; - }; - }; - }; - /** 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; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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; - /** Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. */ - individual?: { - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - address_kana?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - address_kanji?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - dob?: Partial<{ - day: number; - month: number; - year: number; - }> & - Partial<"">; - 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?: Partial<{ [key: string]: string }> & Partial<"">; - phone?: string; - ssn_last_4?: string; - verification?: { - additional_document?: { - back?: string; - front?: string; - }; - document?: { - back?: string; - front?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** 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" - | "legacy_payments" - | "tax_reporting_us_1099_k" - | "tax_reporting_us_1099_misc" - | "transfers" - )[]; - /** Options for customizing how the account functions within Stripe. */ - settings?: { - branding?: { - icon?: string; - logo?: string; - primary_color?: string; - secondary_color?: string; - }; - card_payments?: { - decline_on?: { - avs_failure?: boolean; - cvc_failure?: boolean; - }; - statement_descriptor_prefix?: string; - }; - payments?: { - statement_descriptor?: string; - statement_descriptor_kana?: string; - statement_descriptor_kanji?: string; - }; - payouts?: { - debit_negative_balances?: boolean; - schedule?: { - delay_days?: Partial<"minimum"> & Partial; - interval?: "daily" | "manual" | "monthly" | "weekly"; - monthly_anchor?: number; - weekly_anchor?: - | "friday" - | "monday" - | "saturday" - | "sunday" - | "thursday" - | "tuesday" - | "wednesday"; - }; - statement_descriptor?: string; - }; - }; - /** 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; - }; - }; - }; - }; - /** - *

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: { - "application/json": components["schemas"]["deleted_account"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /**

Create an external account for a given account.

*/ - PostAccountsAccountBankAccounts: { - parameters: { - path: { - account: string; - }; - }; - responses: { - /** Successful response. */ - 200: { - "application/json": components["schemas"]["external_account"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { - /** 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?: Partial<{ - account_holder_name?: string; - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - object?: "bank_account"; - routing_number?: string; - }> & - Partial; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - external_account?: 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?: { [key: string]: string }; }; }; }; - /**

Retrieve a specified external account for a given account.

*/ - GetAccountsAccountBankAccountsId: { + /**

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

*/ + GetAccounts: { parameters: { - path: { - account: string; - id: string; - }; query: { + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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: { - "application/json": components["schemas"]["external_account"]; + content: { + "application/json": { + data: components["schemas"]["account"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /** - *

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.

+ *

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.

*/ - PostAccountsAccountBankAccountsId: { - parameters: { - path: { - account: string; - id: string; - }; - }; - responses: { - /** Successful response. */ - 200: { - "application/json": components["schemas"]["external_account"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { - /** The name of the person or business that owns the bank account. */ - account_holder_name?: string; - /** The type of entity that holds the account. This can be either `individual` or `company`. */ - account_holder_type?: "" | "company" | "individual"; - /** City/District/Suburb/Town/Village. */ - address_city?: string; - /** Billing address country, if provided when creating card. */ - address_country?: string; - /** Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string; - /** Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string; - /** State/County/Province/Region. */ - address_state?: string; - /** ZIP or postal code. */ - address_zip?: string; - /** When set to true, this becomes the default external account for its currency. */ - default_for_currency?: boolean; - /** Two digit number representing the card’s expiration month. */ - exp_month?: string; - /** Four digit number representing the card’s expiration year. */ - exp_year?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** Cardholder name. */ - name?: string; - }; - }; - }; - /**

Delete a specified external account for a given account.

*/ - DeleteAccountsAccountBankAccountsId: { - parameters: { - path: { - account: string; - id: string; - }; - }; - responses: { - /** Successful response. */ - 200: { - "application/json": components["schemas"]["deleted_external_account"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /**

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[]; - }; - }; + PostAccounts: { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["capability"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": components["schemas"]["account"]; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /**

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: { - "application/json": components["schemas"]["capability"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /**

Updates an existing Account Capability.

*/ - PostAccountsAccountCapabilitiesCapability: { - parameters: { - path: { - account: string; - capability: string; - }; - }; - responses: { - /** Successful response. */ - 200: { - "application/json": components["schemas"]["capability"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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; + content: { + "application/x-www-form-urlencoded": { + /** An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ + account_token?: string; + /** 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?: Partial<{ + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + }> & + Partial; + /** 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; + }; + /** The business type. */ + business_type?: "company" | "government_entity" | "individual" | "non_profit"; + /** Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`. */ + company?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + 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; + 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?: { + document?: { + back?: string; + front?: string; + }; + }; + }; + /** 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; + /** 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; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. */ + individual?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + address_kanji?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + dob?: Partial<{ + day: number; + month: number; + year: number; + }> & + Partial<"">; + 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?: Partial<{ [key: string]: string }> & Partial<"">; + phone?: string; + ssn_last_4?: string; + verification?: { + additional_document?: { + back?: string; + front?: string; + }; + document?: { + back?: string; + front?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** 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" + | "legacy_payments" + | "tax_reporting_us_1099_k" + | "tax_reporting_us_1099_misc" + | "transfers" + )[]; + /** Options for customizing how the account functions within Stripe. */ + settings?: { + branding?: { + icon?: string; + logo?: string; + primary_color?: string; + secondary_color?: string; + }; + card_payments?: { + decline_on?: { + avs_failure?: boolean; + cvc_failure?: boolean; + }; + statement_descriptor_prefix?: string; + }; + payments?: { + statement_descriptor?: string; + statement_descriptor_kana?: string; + statement_descriptor_kanji?: string; + }; + payouts?: { + debit_negative_balances?: boolean; + schedule?: { + delay_days?: Partial<"minimum"> & Partial; + interval?: "daily" | "manual" | "monthly" | "weekly"; + monthly_anchor?: number; + weekly_anchor?: "friday" | "monday" | "saturday" | "sunday" | "thursday" | "tuesday" | "wednesday"; + }; + statement_descriptor?: string; + }; + }; + /** 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; + }; + /** 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. */ + type?: "custom" | "express" | "standard"; + }; }; }; }; - /**

List external accounts for an account.

*/ - GetAccountsAccountExternalAccounts: { + /**

Retrieves the details of an account.

*/ + GetAccountsAccount: { 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: { - "application/json": { - /** The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ - data: (Partial & - Partial)[]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": components["schemas"]["account"]; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /**

Create an external account for a given account.

*/ - PostAccountsAccountExternalAccounts: { - parameters: { - path: { - account: string; - }; - }; - responses: { - /** Successful response. */ - 200: { - "application/json": components["schemas"]["external_account"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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?: Partial<{ - account_holder_name?: string; - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - object?: "bank_account"; - routing_number?: string; - }> & - Partial; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - external_account?: 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?: { [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: { - "application/json": components["schemas"]["external_account"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; - requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; }; /** - *

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.

+ *

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.

*/ - PostAccountsAccountExternalAccountsId: { - parameters: { - path: { - account: string; - id: string; - }; - }; - responses: { - /** Successful response. */ - 200: { - "application/json": components["schemas"]["external_account"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { - /** The name of the person or business that owns the bank account. */ - account_holder_name?: string; - /** The type of entity that holds the account. This can be either `individual` or `company`. */ - account_holder_type?: "" | "company" | "individual"; - /** City/District/Suburb/Town/Village. */ - address_city?: string; - /** Billing address country, if provided when creating card. */ - address_country?: string; - /** Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string; - /** Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string; - /** State/County/Province/Region. */ - address_state?: string; - /** ZIP or postal code. */ - address_zip?: string; - /** When set to true, this becomes the default external account for its currency. */ - default_for_currency?: boolean; - /** Two digit number representing the card’s expiration month. */ - exp_month?: string; - /** Four digit number representing the card’s expiration year. */ - exp_year?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** Cardholder name. */ - name?: string; - }; - }; - }; - /**

Delete a specified external account for a given account.

*/ - DeleteAccountsAccountExternalAccountsId: { + PostAccountsAccount: { parameters: { path: { account: string; - id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_external_account"]; + content: { + "application/json": components["schemas"]["account"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /** - *

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; + content: { + "application/x-www-form-urlencoded": { + /** An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ + account_token?: string; + /** 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?: Partial<{ + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + }> & + Partial; + /** 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; + }; + /** The business type. */ + business_type?: "company" | "government_entity" | "individual" | "non_profit"; + /** Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`. */ + company?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + 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; + 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?: { + document?: { + back?: string; + front?: string; + }; + }; + }; + /** 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; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. */ + individual?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + address_kanji?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + dob?: Partial<{ + day: number; + month: number; + year: number; + }> & + Partial<"">; + 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?: Partial<{ [key: string]: string }> & Partial<"">; + phone?: string; + ssn_last_4?: string; + verification?: { + additional_document?: { + back?: string; + front?: string; + }; + document?: { + back?: string; + front?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** 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" + | "legacy_payments" + | "tax_reporting_us_1099_k" + | "tax_reporting_us_1099_misc" + | "transfers" + )[]; + /** Options for customizing how the account functions within Stripe. */ + settings?: { + branding?: { + icon?: string; + logo?: string; + primary_color?: string; + secondary_color?: string; + }; + card_payments?: { + decline_on?: { + avs_failure?: boolean; + cvc_failure?: boolean; + }; + statement_descriptor_prefix?: string; + }; + payments?: { + statement_descriptor?: string; + statement_descriptor_kana?: string; + statement_descriptor_kanji?: string; + }; + payouts?: { + debit_negative_balances?: boolean; + schedule?: { + delay_days?: Partial<"minimum"> & Partial; + interval?: "daily" | "manual" | "monthly" | "weekly"; + monthly_anchor?: number; + weekly_anchor?: "friday" | "monday" | "saturday" | "sunday" | "thursday" | "tuesday" | "wednesday"; + }; + statement_descriptor?: string; + }; + }; + /** 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; + }; + }; + }; + }; + }; + /** + *

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: { - "application/json": components["schemas"]["login_link"]; + content: { + "application/json": components["schemas"]["deleted_account"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** Where to redirect the user after they log out of their dashboard. */ - redirect_url?: string; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; - /** - *

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: { + /**

Create an external account for a given account.

*/ + PostAccountsAccountBankAccounts: { parameters: { path: { account: string; @@ -11980,794 +11326,570 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["light_account_logout"]; + content: { + "application/json": components["schemas"]["external_account"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + content: { + "application/x-www-form-urlencoded": { + /** 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?: Partial<{ + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + }> & + Partial; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + external_account?: 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?: { [key: string]: 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: { + /**

Retrieve a specified external account for a given account.

*/ + GetAccountsAccountBankAccountsId: { parameters: { path: { account: string; + id: 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: { - "application/json": { - data: components["schemas"]["person"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": components["schemas"]["external_account"]; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

Creates a new person.

*/ - PostAccountsAccountPeople: { + /** + *

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; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["person"]; + content: { + "application/json": components["schemas"]["external_account"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** The person's address. */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - /** 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; - }; - /** 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; - }; - /** The person's date of birth. */ - dob?: Partial<{ - day: number; - month: number; - year: number; - }> & - Partial<"">; - /** The person's email address. */ - email?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** The person's first name. */ - first_name?: string; - /** The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string; - /** The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string; - /** The person's gender (International regulations require either "male" or "female"). */ - gender?: string; - /** 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; - /** The person's last name. */ - last_name?: string; - /** The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string; - /** The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string; - /** The person's maiden name. */ - maiden_name?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string; - /** The person's phone number. */ - phone?: string; - /** The relationship that this person has with the account's legal entity. */ - relationship?: { - director?: boolean; - executive?: boolean; - owner?: boolean; - percent_ownership?: Partial & Partial<"">; - representative?: boolean; - title?: string; - }; - /** The last 4 digits of the person's social security number. */ - ssn_last_4?: string; - /** The person's verification status. */ - verification?: { - additional_document?: { - back?: string; - front?: string; - }; - document?: { - back?: string; - front?: string; - }; + content: { + "application/x-www-form-urlencoded": { + /** The name of the person or business that owns the bank account. */ + account_holder_name?: string; + /** The type of entity that holds the account. This can be either `individual` or `company`. */ + account_holder_type?: "" | "company" | "individual"; + /** City/District/Suburb/Town/Village. */ + address_city?: string; + /** Billing address country, if provided when creating card. */ + address_country?: string; + /** Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string; + /** Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string; + /** State/County/Province/Region. */ + address_state?: string; + /** ZIP or postal code. */ + address_zip?: string; + /** When set to true, this becomes the default external account for its currency. */ + default_for_currency?: boolean; + /** Two digit number representing the card’s expiration month. */ + exp_month?: string; + /** Four digit number representing the card’s expiration year. */ + exp_year?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** Cardholder name. */ + name?: string; }; }; }; }; - /**

Retrieves an existing person.

*/ - GetAccountsAccountPeoplePerson: { + /**

Delete a specified external account for a given account.

*/ + DeleteAccountsAccountBankAccountsId: { parameters: { path: { account: string; - person: string; - }; - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["person"]; + content: { + "application/json": components["schemas"]["deleted_external_account"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

Updates an existing person.

*/ - PostAccountsAccountPeoplePerson: { + /**

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; - person: string; + }; + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["person"]; + content: { + "application/json": { + data: components["schemas"]["capability"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** The person's address. */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - /** 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; - }; - /** 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; - }; - /** The person's date of birth. */ - dob?: Partial<{ - day: number; - month: number; - year: number; - }> & - Partial<"">; - /** The person's email address. */ - email?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** The person's first name. */ - first_name?: string; - /** The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string; - /** The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string; - /** The person's gender (International regulations require either "male" or "female"). */ - gender?: string; - /** 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; - /** The person's last name. */ - last_name?: string; - /** The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string; - /** The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string; - /** The person's maiden name. */ - maiden_name?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string; - /** The person's phone number. */ - phone?: string; - /** The relationship that this person has with the account's legal entity. */ - relationship?: { - director?: boolean; - executive?: boolean; - owner?: boolean; - percent_ownership?: Partial & Partial<"">; - representative?: boolean; - title?: string; - }; - /** The last 4 digits of the person's social security number. */ - ssn_last_4?: string; - /** The person's verification status. */ - verification?: { - additional_document?: { - back?: string; - front?: string; - }; - 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: { - "application/json": components["schemas"]["deleted_person"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; - requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; }; - /**

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: { + /**

Retrieves information about the specified Account Capability.

*/ + GetAccountsAccountCapabilitiesCapability: { parameters: { path: { account: string; + capability: 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: { - "application/json": { - data: components["schemas"]["person"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": components["schemas"]["capability"]; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

Creates a new person.

*/ - PostAccountsAccountPersons: { + /**

Updates an existing Account Capability.

*/ + PostAccountsAccountCapabilitiesCapability: { parameters: { path: { account: string; + capability: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["person"]; + content: { + "application/json": components["schemas"]["capability"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** The person's address. */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - /** 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; - }; - /** 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; - }; - /** The person's date of birth. */ - dob?: Partial<{ - day: number; - month: number; - year: number; - }> & - Partial<"">; - /** The person's email address. */ - email?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** The person's first name. */ - first_name?: string; - /** The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string; - /** The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string; - /** The person's gender (International regulations require either "male" or "female"). */ - gender?: string; - /** 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; - /** The person's last name. */ - last_name?: string; - /** The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string; - /** The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string; - /** The person's maiden name. */ - maiden_name?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string; - /** The person's phone number. */ - phone?: string; - /** The relationship that this person has with the account's legal entity. */ - relationship?: { - director?: boolean; - executive?: boolean; - owner?: boolean; - percent_ownership?: Partial & Partial<"">; - representative?: boolean; - title?: string; - }; - /** The last 4 digits of the person's social security number. */ - ssn_last_4?: string; - /** The person's verification status. */ - verification?: { - additional_document?: { - back?: string; - front?: string; - }; - document?: { - back?: string; - front?: string; - }; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; }; }; }; }; - /**

Retrieves an existing person.

*/ - GetAccountsAccountPersonsPerson: { + /**

List external accounts for an account.

*/ + GetAccountsAccountExternalAccounts: { parameters: { path: { account: string; - person: 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: { - "application/json": components["schemas"]["person"]; + content: { + "application/json": { + /** The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ + data: (Partial & Partial)[]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

Updates an existing person.

*/ - PostAccountsAccountPersonsPerson: { + /**

Create an external account for a given account.

*/ + PostAccountsAccountExternalAccounts: { parameters: { path: { account: string; - person: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["person"]; + content: { + "application/json": components["schemas"]["external_account"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** The person's address. */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - /** 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; - }; - /** 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; - }; - /** The person's date of birth. */ - dob?: Partial<{ - day: number; - month: number; - year: number; - }> & - Partial<"">; - /** The person's email address. */ - email?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** The person's first name. */ - first_name?: string; - /** The Kana variation of the person's first name (Japan only). */ - first_name_kana?: string; - /** The Kanji variation of the person's first name (Japan only). */ - first_name_kanji?: string; - /** The person's gender (International regulations require either "male" or "female"). */ - gender?: string; - /** 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; - /** The person's last name. */ - last_name?: string; - /** The Kana variation of the person's last name (Japan only). */ - last_name_kana?: string; - /** The Kanji variation of the person's last name (Japan only). */ - last_name_kanji?: string; - /** The person's maiden name. */ - maiden_name?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ - person_token?: string; - /** The person's phone number. */ - phone?: string; - /** The relationship that this person has with the account's legal entity. */ - relationship?: { - director?: boolean; - executive?: boolean; - owner?: boolean; - percent_ownership?: Partial & Partial<"">; - representative?: boolean; - title?: string; - }; - /** The last 4 digits of the person's social security number. */ - ssn_last_4?: string; - /** The person's verification status. */ - verification?: { - additional_document?: { - back?: string; - front?: string; - }; - document?: { - back?: string; - front?: string; - }; + content: { + "application/x-www-form-urlencoded": { + /** 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?: Partial<{ + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + }> & + Partial; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + external_account?: 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?: { [key: string]: 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: { + /**

Retrieve a specified external account for a given account.

*/ + GetAccountsAccountExternalAccountsId: { parameters: { path: { account: string; - person: string; + id: string; + }; + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_person"]; + content: { + "application/json": components["schemas"]["external_account"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /** - *

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.

+ *

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.

*/ - PostAccountsAccountReject: { + PostAccountsAccountExternalAccountsId: { parameters: { path: { account: string; + id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["account"]; + content: { + "application/json": components["schemas"]["external_account"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`. */ - reason: string; + content: { + "application/x-www-form-urlencoded": { + /** The name of the person or business that owns the bank account. */ + account_holder_name?: string; + /** The type of entity that holds the account. This can be either `individual` or `company`. */ + account_holder_type?: "" | "company" | "individual"; + /** City/District/Suburb/Town/Village. */ + address_city?: string; + /** Billing address country, if provided when creating card. */ + address_country?: string; + /** Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string; + /** Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string; + /** State/County/Province/Region. */ + address_state?: string; + /** ZIP or postal code. */ + address_zip?: string; + /** When set to true, this becomes the default external account for its currency. */ + default_for_currency?: boolean; + /** Two digit number representing the card’s expiration month. */ + exp_month?: string; + /** Four digit number representing the card’s expiration year. */ + exp_year?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** Cardholder name. */ + name?: string; + }; }; }; }; - /**

List apple pay domains.

*/ - GetApplePayDomains: { + /**

Delete a specified external account for a given account.

*/ + DeleteAccountsAccountExternalAccountsId: { 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; + path: { + account: string; + id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["apple_pay_domain"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": components["schemas"]["deleted_external_account"]; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /**

Create an apple pay domain.

*/ - PostApplePayDomains: { - responses: { - /** Successful response. */ - 200: { - "application/json": components["schemas"]["apple_pay_domain"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - domain_name: string; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; - /**

Retrieve an apple pay domain.

*/ - GetApplePayDomainsDomain: { + /** + *

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: { - domain: string; - }; - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + account: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["apple_pay_domain"]; + content: { + "application/json": components["schemas"]["login_link"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Where to redirect the user after they log out of their dashboard. */ + redirect_url?: string; + }; + }; }; }; - /**

Delete an apple pay domain.

*/ - DeleteApplePayDomainsDomain: { + /** + *

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: { - domain: string; + account: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_apple_pay_domain"]; + content: { + "application/json": components["schemas"]["light_account_logout"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; + }; }; }; - /**

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: { + /**

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: { - /** Only return application fees for the charge specified by this charge ID. */ - charge?: string; - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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; }; @@ -12775,135 +11897,326 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["application_fee"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["person"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

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: { + /**

Creates a new person.

*/ + PostAccountsAccountPeople: { parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - }; path: { - fee: string; - id: string; + account: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["fee_refund"]; + content: { + "application/json": components["schemas"]["person"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { + /** The person's address. */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + /** 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; + }; + /** 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; + }; + /** The person's date of birth. */ + dob?: Partial<{ + day: number; + month: number; + year: number; + }> & + Partial<"">; + /** The person's email address. */ + email?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The person's first name. */ + first_name?: string; + /** The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string; + /** The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string; + /** The person's gender (International regulations require either "male" or "female"). */ + gender?: string; + /** 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; + /** The person's last name. */ + last_name?: string; + /** The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string; + /** The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string; + /** The person's maiden name. */ + maiden_name?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string; + /** The person's phone number. */ + phone?: string; + /** The relationship that this person has with the account's legal entity. */ + relationship?: { + director?: boolean; + executive?: boolean; + owner?: boolean; + percent_ownership?: Partial & Partial<"">; + representative?: boolean; + title?: string; + }; + /** The last 4 digits of the person's social security number. */ + ssn_last_4?: string; + /** The person's verification status. */ + verification?: { + additional_document?: { + back?: string; + front?: string; + }; + document?: { + back?: string; + front?: string; + }; + }; + }; + }; }; }; - /** - *

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: { + /**

Retrieves an existing person.

*/ + GetAccountsAccountPeoplePerson: { parameters: { path: { - fee: string; - id: string; + account: string; + person: string; + }; + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["fee_refund"]; + content: { + "application/json": components["schemas"]["person"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; - /**

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

*/ - GetApplicationFeesId: { + /**

Updates an existing person.

*/ + PostAccountsAccountPeoplePerson: { parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - }; path: { - id: string; + account: string; + person: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["application_fee"]; + content: { + "application/json": components["schemas"]["person"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { + /** The person's address. */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + /** 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; + }; + /** 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; + }; + /** The person's date of birth. */ + dob?: Partial<{ + day: number; + month: number; + year: number; + }> & + Partial<"">; + /** The person's email address. */ + email?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The person's first name. */ + first_name?: string; + /** The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string; + /** The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string; + /** The person's gender (International regulations require either "male" or "female"). */ + gender?: string; + /** 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; + /** The person's last name. */ + last_name?: string; + /** The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string; + /** The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string; + /** The person's maiden name. */ + maiden_name?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string; + /** The person's phone number. */ + phone?: string; + /** The relationship that this person has with the account's legal entity. */ + relationship?: { + director?: boolean; + executive?: boolean; + owner?: boolean; + percent_ownership?: Partial & Partial<"">; + representative?: boolean; + title?: string; + }; + /** The last 4 digits of the person's social security number. */ + ssn_last_4?: string; + /** The person's verification status. */ + verification?: { + additional_document?: { + back?: string; + front?: string; + }; + document?: { + back?: string; + front?: string; + }; + }; + }; + }; }; }; - PostApplicationFeesIdRefund: { + /**

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: { - id: string; + account: string; + person: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["application_fee"]; + content: { + "application/json": components["schemas"]["deleted_person"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - amount?: number; - directive?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; - /**

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: { + /**

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; @@ -12911,457 +12224,503 @@ export interface operations { 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; }; - path: { - id: string; - }; }; responses: { /** Successful response. */ 200: { - "application/json": { - /** Details about each object. */ - data: components["schemas"]["fee_refund"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["person"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /** - *

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: { - "application/json": components["schemas"]["fee_refund"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: { [key: string]: string }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; - /** - *

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: { + /**

Creates a new person.

*/ + PostAccountsAccountPersons: { parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + path: { + account: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["balance"]; + content: { + "application/json": components["schemas"]["person"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /** - *

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: { - available_on?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; - /** 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; + content: { + "application/x-www-form-urlencoded": { + /** The person's address. */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + /** 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; + }; + /** 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; + }; + /** The person's date of birth. */ + dob?: Partial<{ + day: number; + month: number; + year: number; + }> & + Partial<"">; + /** The person's email address. */ + email?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The person's first name. */ + first_name?: string; + /** The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string; + /** The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string; + /** The person's gender (International regulations require either "male" or "female"). */ + gender?: string; + /** 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; + /** The person's last name. */ + last_name?: string; + /** The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string; + /** The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string; + /** The person's maiden name. */ + maiden_name?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string; + /** The person's phone number. */ + phone?: string; + /** The relationship that this person has with the account's legal entity. */ + relationship?: { + director?: boolean; + executive?: boolean; + owner?: boolean; + percent_ownership?: Partial & Partial<"">; + representative?: boolean; + title?: string; + }; + /** The last 4 digits of the person's social security number. */ + ssn_last_4?: string; + /** The person's verification status. */ + verification?: { + additional_document?: { + back?: string; + front?: string; + }; + 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[]; - /** 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: { - "application/json": { - data: components["schemas"]["balance_transaction"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": components["schemas"]["person"]; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /** - *

Retrieves the balance transaction with the given ID.

- * - *

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

- */ - GetBalanceHistoryId: { + /**

Updates an existing person.

*/ + PostAccountsAccountPersonsPerson: { parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - }; path: { - id: string; + account: string; + person: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["balance_transaction"]; + content: { + "application/json": components["schemas"]["person"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { + /** The person's address. */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + /** 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; + }; + /** 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; + }; + /** The person's date of birth. */ + dob?: Partial<{ + day: number; + month: number; + year: number; + }> & + Partial<"">; + /** The person's email address. */ + email?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The person's first name. */ + first_name?: string; + /** The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string; + /** The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string; + /** The person's gender (International regulations require either "male" or "female"). */ + gender?: string; + /** 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; + /** The person's last name. */ + last_name?: string; + /** The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string; + /** The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string; + /** The person's maiden name. */ + maiden_name?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string; + /** The person's phone number. */ + phone?: string; + /** The relationship that this person has with the account's legal entity. */ + relationship?: { + director?: boolean; + executive?: boolean; + owner?: boolean; + percent_ownership?: Partial & Partial<"">; + representative?: boolean; + title?: string; + }; + /** The last 4 digits of the person's social security number. */ + ssn_last_4?: string; + /** The person's verification status. */ + verification?: { + additional_document?: { + back?: string; + front?: string; + }; + document?: { + back?: string; + front?: string; + }; + }; + }; + }; }; }; - /** - *

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: { + /**

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: { - query: { - available_on?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; - /** 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: `charge`, `refund`, `adjustment`, `application_fee`, `application_fee_refund`, `transfer`, `payment`, `payout`, `payout_failure`, `stripe_fee`, or `network_cost`. */ - type?: string; + path: { + account: string; + person: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["balance_transaction"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": components["schemas"]["deleted_person"]; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /** - *

Retrieves the balance transaction with the given ID.

+ *

With Connect, you may flag accounts as suspicious.

* - *

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

+ *

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.

*/ - GetBalanceTransactionsId: { + PostAccountsAccountReject: { parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - }; path: { - id: string; + account: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["balance_transaction"]; + content: { + "application/json": components["schemas"]["account"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /**

Creates a session of the Self-service Portal.

*/ - PostBillingPortalSessions: { - responses: { - /** Successful response. */ - 200: { - "application/json": components["schemas"]["billing_portal.session"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { - /** The ID of an existing customer. */ - customer: string; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`. */ + reason: string; + }; }; }; }; - /**

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

*/ - GetBitcoinReceivers: { + /**

List apple pay domains.

*/ + GetApplePayDomains: { parameters: { query: { - /** Filter for active receivers. */ - active?: boolean; + 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[]; - /** 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: { - "application/json": { - data: components["schemas"]["bitcoin_receiver"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["apple_pay_domain"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /**

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; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; + }; + /**

Create an apple pay domain.

*/ + PostApplePayDomains: { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["bitcoin_receiver"]; + content: { + "application/json": components["schemas"]["apple_pay_domain"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { + domain_name: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; + }; }; }; - /**

List bitcoin transacitons for a given receiver.

*/ - GetBitcoinReceiversReceiverTransactions: { + /**

Retrieve an apple pay domain.

*/ + GetApplePayDomainsDomain: { parameters: { + path: { + domain: string; + }; 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: { - "application/json": { - /** Details about each object. */ - data: components["schemas"]["bitcoin_transaction"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": components["schemas"]["apple_pay_domain"]; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

List bitcoin transacitons for a given receiver.

*/ - GetBitcoinTransactions: { + /**

Delete an apple pay domain.

*/ + DeleteApplePayDomainsDomain: { 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; + path: { + domain: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": { - /** Details about each object. */ - data: components["schemas"]["bitcoin_transaction"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": components["schemas"]["deleted_apple_pay_domain"]; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

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

*/ - GetCharges: { + /**

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?: Partial<{ gt?: number; gte?: number; @@ -13369,657 +12728,822 @@ export interface operations { lte?: number; }> & Partial; - /** 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: { - "application/json": { - data: components["schemas"]["charge"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["application_fee"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

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: { + /**

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: { - "application/json": components["schemas"]["charge"]; + content: { + "application/json": components["schemas"]["fee_refund"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** 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; - /** 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; - /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ - card?: Partial<{ - 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; - object?: "card"; - }> & - Partial; - /** 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; - /** The ID of an existing customer that will be charged in this request. */ - customer?: string; - /** 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?: Partial<{ - account: string; - amount?: number; - }> & - Partial; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** 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; - /** 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 information for the charge. Helps prevent fraud on charges for physical goods. */ - shipping?: { - address: { - city?: string; - country?: string; - line1: string; - line2?: string; - postal_code?: string; - state?: string; - }; - carrier?: string; - name: string; - phone?: string; - tracking_number?: string; - }; - /** 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; - /** 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; - /** 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; - /** 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; - }; - /** 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; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; - /**

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: { + /** + *

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: { - charge: string; - }; - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + fee: string; + id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["charge"]; + content: { + "application/json": components["schemas"]["fee_refund"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + }; + }; }; }; - /**

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

*/ - PostChargesCharge: { + /**

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: { - charge: string; + id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["charge"]; + content: { + "application/json": components["schemas"]["application_fee"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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?: { - user_report: "" | "fraudulent" | "safe"; - }; - /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; - /** 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 information for the charge. Helps prevent fraud on charges for physical goods. */ - shipping?: { - address: { - city?: string; - country?: string; - line1: string; - line2?: string; - postal_code?: string; - state?: string; - }; - carrier?: string; - name: string; - phone?: string; - tracking_number?: string; - }; - /** 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; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; - /** - *

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: { + PostApplicationFeesIdRefund: { parameters: { path: { - charge: string; + id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["charge"]; + content: { + "application/json": components["schemas"]["application_fee"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. */ - amount?: number; - /** An application fee to add on to this charge. */ - application_fee?: number; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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; - /** 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; - /** 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; - /** 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?: { + content: { + "application/x-www-form-urlencoded": { amount?: number; + directive?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; }; - /** 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: { + /**

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: { - 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; + }; + path: { + id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["dispute"]; + content: { + "application/json": { + /** Details about each object. */ + data: components["schemas"]["fee_refund"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - PostChargesChargeDispute: { + /** + *

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: { - charge: string; + id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["dispute"]; + content: { + "application/json": components["schemas"]["fee_refund"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; + content: { + "application/x-www-form-urlencoded": { + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [key: string]: string }; }; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** 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; - }; + /** + *

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: { - "application/json": components["schemas"]["dispute"]; + content: { + "application/json": components["schemas"]["balance"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /** + *

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: { + available_on?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; + /** 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: `charge`, `refund`, `adjustment`, `application_fee`, `application_fee_refund`, `transfer`, `payment`, `payout`, `payout_failure`, `stripe_fee`, or `network_cost`. */ + type?: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + data: components["schemas"]["balance_transaction"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** 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]: any }; }; }; }; /** - *

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.

+ *

Retrieves the balance transaction with the given ID.

* - *

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.

+ *

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

*/ - PostChargesChargeRefund: { + GetBalanceHistoryId: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; path: { - charge: string; + id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["charge"]; + content: { + "application/json": components["schemas"]["balance_transaction"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - amount?: number; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - payment_intent?: string; - reason?: "duplicate" | "fraudulent" | "requested_by_customer"; - refund_application_fee?: boolean; - reverse_transfer?: boolean; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; - /**

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: { + /** + *

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: { - path: { - charge: string; - }; query: { + available_on?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; + /** 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: `charge`, `refund`, `adjustment`, `application_fee`, `application_fee_refund`, `transfer`, `payment`, `payout`, `payout_failure`, `stripe_fee`, or `network_cost`. */ + type?: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": { - /** Details about each object. */ - data: components["schemas"]["refund"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["balance_transaction"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

Create a refund.

*/ - PostChargesChargeRefunds: { + /** + *

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: { - charge: string; + id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["refund"]; + content: { + "application/json": components["schemas"]["balance_transaction"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - amount?: number; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - payment_intent?: string; - reason?: "duplicate" | "fraudulent" | "requested_by_customer"; - refund_application_fee?: boolean; - reverse_transfer?: boolean; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; - /**

Retrieves the details of an existing refund.

*/ - GetChargesChargeRefundsRefund: { - parameters: { - path: { - charge: string; - refund: string; + /**

Creates a session of the Self-service 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": { + /** The ID of an existing customer. */ + customer: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + }; }; + }; + }; + /**

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: { - "application/json": components["schemas"]["refund"]; + content: { + "application/json": { + data: components["schemas"]["bitcoin_receiver"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

Update a specified refund.

*/ - PostChargesChargeRefundsRefund: { + /**

Retrieves the Bitcoin receiver with the given ID.

*/ + GetBitcoinReceiversId: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; path: { - charge: string; - refund: string; + id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["refund"]; + content: { + "application/json": components["schemas"]["bitcoin_receiver"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; - /**

Returns a list of Checkout Sessions.

*/ - GetCheckoutSessions: { + /**

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; - /** 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; + }; + path: { + receiver: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["checkout.session"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + /** Details about each object. */ + data: components["schemas"]["bitcoin_transaction"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

Creates a Session object.

*/ - PostCheckoutSessions: { + /**

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: { - "application/json": components["schemas"]["checkout.session"]; + content: { + "application/json": { + /** Details about each object. */ + data: components["schemas"]["bitcoin_transaction"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specify whether Checkout should collect the customer's billing address. */ - billing_address_collection?: "auto" | "required"; - /** The URL the customer will be directed to if they decide to cancel payment and return to your website. */ - cancel_url: string; - /** - * 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; - /** - * 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; - /** - * 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** - * 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?: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; + /** 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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** 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]: any }; + }; + }; + }; + /**

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": { + /** 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; - currency?: string; - description?: string; - images?: string[]; - name?: string; - quantity: number; - tax_rates?: string[]; - }[]; - /** The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. */ - locale?: - | "auto" - | "da" - | "de" - | "en" - | "es" - | "fi" - | "fr" - | "it" - | "ja" - | "ms" - | "nb" - | "nl" - | "pl" - | "pt" - | "pt-BR" - | "sv" - | "zh"; - /** Set of key-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]: string }; - /** The mode of the Checkout Session, one of `payment`, `setup`, or `subscription`. */ - mode?: "payment" | "setup" | "subscription"; - /** A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. */ - payment_intent_data?: { + application_fee?: number; + /** 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; - capture_method?: "automatic" | "manual"; + /** 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; + /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ + card?: Partial<{ + 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; + object?: "card"; + }> & + Partial; + /** 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; + /** The ID of an existing customer that will be charged in this request. */ + customer?: string; + /** 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; - metadata?: { [key: string]: string }; + destination?: Partial<{ + account: string; + amount?: number; + }> & + Partial; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** 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; + /** 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; - setup_future_usage?: "off_session" | "on_session"; + /** Shipping information for the charge. Helps prevent fraud on charges for physical goods. */ shipping?: { address: { city?: string; @@ -14034,554 +13558,348 @@ export interface operations { phone?: string; tracking_number?: string; }; + /** 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; + /** 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; + /** 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; + /** 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; }; + /** 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; }; - /** A list of the types of payment methods (e.g., card) this Checkout session can accept. */ - payment_method_types: ("card" | "fpx" | "ideal")[]; - /** 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; - }; - /** 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" - )[]; - }; - /** - * 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. - */ - submit_type?: "auto" | "book" | "donate" | "pay"; - /** 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 }; - trial_end?: number; - trial_from_plan?: boolean; - trial_period_days?: number; - }; - /** - * 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; }; }; }; - /**

Retrieves a Session object.

*/ - GetCheckoutSessionsSession: { + /**

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[]; }; - path: { - session: string; - }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["checkout.session"]; + content: { + "application/json": components["schemas"]["charge"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

Lists all Country Spec objects available in the API.

*/ - GetCountrySpecs: { + /**

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

*/ + PostChargesCharge: { 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: { + charge: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["country_spec"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": components["schemas"]["charge"]; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { + /** 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; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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?: { + user_report: "" | "fraudulent" | "safe"; + }; + /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; + /** 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 information for the charge. Helps prevent fraud on charges for physical goods. */ + shipping?: { + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + }; + carrier?: string; + name: string; + phone?: string; + tracking_number?: string; + }; + /** 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; + }; + }; }; }; - /**

Returns a Country Spec for a given Country code.

*/ - GetCountrySpecsCountry: { + /** + *

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: { - country: string; - }; - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + charge: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["country_spec"]; + content: { + "application/json": components["schemas"]["charge"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { + /** The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. */ + amount?: number; + /** An application fee to add on to this charge. */ + application_fee?: number; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** 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; + /** 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; + /** 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; + }; + /** 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; + }; + }; }; }; - /**

Returns a list of your coupons.

*/ - GetCoupons: { + /**

Retrieve a dispute for a specified charge.

*/ + GetChargesChargeDispute: { parameters: { + path: { + charge: string; + }; 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?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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: { - "application/json": { - data: components["schemas"]["coupon"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": components["schemas"]["dispute"]; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /** - *

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: { + PostChargesChargeDispute: { + parameters: { + path: { + charge: string; + }; + }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["coupon"]; + content: { + "application/json": components["schemas"]["dispute"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). */ - amount_off?: number; - /** 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; - /** Specifies how long the discount will be in effect. Can be `forever`, `once`, or `repeating`. */ - duration: "forever" | "once" | "repeating"; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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; - /** 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; - /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; - /** 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; - /** 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; - /** 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; + content: { + "application/x-www-form-urlencoded": { + /** 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; + }; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** 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; + }; }; }; }; - /**

Retrieves the coupon with the given ID.

*/ - GetCouponsCoupon: { + PostChargesChargeDisputeClose: { parameters: { path: { - coupon: string; - }; - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + charge: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["coupon"]; + content: { + "application/json": components["schemas"]["dispute"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; + }; }; }; - /**

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

*/ - PostCouponsCoupon: { + /** + *

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: { - coupon: string; + charge: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["coupon"]; + content: { + "application/json": components["schemas"]["charge"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** 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: { - "application/json": components["schemas"]["deleted_coupon"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; + content: { + "application/x-www-form-urlencoded": { + amount?: number; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + payment_intent?: string; + reason?: "duplicate" | "fraudulent" | "requested_by_customer"; + refund_application_fee?: boolean; + reverse_transfer?: boolean; + }; }; }; - requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; }; - /**

Returns a list of credit notes.

*/ - GetCreditNotes: { + /**

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: { - /** 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. */ @@ -14591,223 +13909,136 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["credit_note"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + /** Details about each object. */ + data: components["schemas"]["refund"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /** - *

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: { + /**

Create a refund.

*/ + PostChargesChargeRefunds: { + parameters: { + path: { + charge: string; + }; + }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["credit_note"]; + content: { + "application/json": components["schemas"]["refund"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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?: { + content: { + "application/x-www-form-urlencoded": { amount?: number; - description?: string; - invoice_line_item?: string; - quantity?: number; - tax_rates?: Partial & Partial<"">; - type: "custom_line_item" | "invoice_line_item"; - unit_amount?: number; - unit_amount_decimal?: string; - }[]; - /** 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?: { [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; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + payment_intent?: string; + reason?: "duplicate" | "fraudulent" | "requested_by_customer"; + refund_application_fee?: boolean; + reverse_transfer?: boolean; + }; }; }; }; - /**

Get a preview of a credit note without creating it.

*/ - GetCreditNotesPreview: { + /**

Retrieves the details of an existing refund.

*/ + GetChargesChargeRefundsRefund: { parameters: { + path: { + charge: string; + refund: string; + }; 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?: Partial & Partial<"">; - type: "custom_line_item" | "invoice_line_item"; - unit_amount?: number; - unit_amount_decimal?: string; - }[]; - /** 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?: { [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: { - "application/json": components["schemas"]["credit_note"]; + content: { + "application/json": components["schemas"]["refund"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

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: { + /**

Update a specified refund.

*/ + PostChargesChargeRefundsRefund: { 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?: Partial & Partial<"">; - type: "custom_line_item" | "invoice_line_item"; - unit_amount?: number; - unit_amount_decimal?: string; - }[]; - /** 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?: { [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; + path: { + charge: string; + refund: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": { - /** Details about each object. */ - data: components["schemas"]["credit_note_line_item"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": components["schemas"]["refund"]; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; + }; + }; }; }; - /**

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: { + /**

Returns a list of Checkout Sessions.

*/ + GetCheckoutSessions: { 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; @@ -14815,114 +14046,550 @@ export interface operations { 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: { - "application/json": { - /** Details about each object. */ - data: components["schemas"]["credit_note_line_item"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["checkout.session"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

Retrieves the credit note object with the given identifier.

*/ - GetCreditNotesId: { + /**

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": { + /** Specify whether Checkout should collect the customer's billing address. */ + billing_address_collection?: "auto" | "required"; + /** The URL the customer will be directed to if they decide to cancel payment and return to your website. */ + cancel_url: string; + /** + * 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; + /** + * 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; + /** + * 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** + * 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[]; + }[]; + /** The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. */ + locale?: + | "auto" + | "da" + | "de" + | "en" + | "es" + | "fi" + | "fr" + | "it" + | "ja" + | "ms" + | "nb" + | "nl" + | "pl" + | "pt" + | "pt-BR" + | "sv" + | "zh"; + /** Set of key-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]: string }; + /** The mode of the Checkout Session, one of `payment`, `setup`, or `subscription`. */ + mode?: "payment" | "setup" | "subscription"; + /** A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. */ + payment_intent_data?: { + application_fee_amount?: number; + capture_method?: "automatic" | "manual"; + description?: string; + metadata?: { [key: string]: string }; + on_behalf_of?: string; + receipt_email?: string; + setup_future_usage?: "off_session" | "on_session"; + shipping?: { + 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?: { + amount?: number; + destination: string; + }; + }; + /** A list of the types of payment methods (e.g., card) this Checkout session can accept. */ + payment_method_types: ("card" | "fpx" | "ideal")[]; + /** 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; + }; + /** 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" + )[]; + }; + /** + * 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. + */ + submit_type?: "auto" | "book" | "donate" | "pay"; + /** 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 }; + trial_end?: number; + trial_from_plan?: boolean; + trial_period_days?: number; + }; + /** + * 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; + }; + }; + }; + }; + /**

Retrieves a Session object.

*/ + GetCheckoutSessionsSession: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[]; }; path: { - id: string; + session: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["credit_note"]; + content: { + "application/json": components["schemas"]["checkout.session"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

Updates an existing credit note.

*/ - PostCreditNotesId: { + /**

Lists all Country Spec objects available in the API.

*/ + GetCountrySpecs: { parameters: { - path: { - id: 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: { - "application/json": components["schemas"]["credit_note"]; + content: { + "application/json": { + data: components["schemas"]["country_spec"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** Credit note memo. */ - 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?: { [key: string]: string }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; - /**

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

*/ - PostCreditNotesIdVoid: { + /**

Returns a Country Spec for a given Country code.

*/ + GetCountrySpecsCountry: { parameters: { path: { - id: string; + country: string; + }; + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["credit_note"]; + content: { + "application/json": components["schemas"]["country_spec"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; - /**

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

*/ - GetCustomers: { + /**

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?: Partial<{ gt?: number; gte?: number; @@ -14930,8 +14597,6 @@ export interface operations { lte?: number; }> & Partial; - /** 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; /** Specifies which fields in the response should be expanded. */ @@ -14945,136 +14610,85 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["customer"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["coupon"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

Creates a new customer object.

*/ - PostCustomers: { + /** + *

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: { - "application/json": components["schemas"]["customer"]; + content: { + "application/json": components["schemas"]["coupon"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** The customer's address. */ - address?: Partial<{ - city?: string; - country?: string; - line1: string; - line2?: string; - postal_code?: string; - state?: string; - }> & - Partial<"">; - /** 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; - /** An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. */ - description?: string; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. */ - invoice_prefix?: string; - /** Default invoice settings for this customer. */ - invoice_settings?: { - custom_fields?: Partial< - { - name: string; - value: string; - }[] - > & - Partial<"">; - default_payment_method?: string; - footer?: string; + content: { + "application/x-www-form-urlencoded": { + /** A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). */ + amount_off?: number; + /** 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; + /** Specifies how long the discount will be in effect. Can be `forever`, `once`, or `repeating`. */ + duration: "forever" | "once" | "repeating"; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** 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; + /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; + /** 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; + /** 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; + /** 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; }; - /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; - /** The customer's full name or business name. */ - name?: string; - /** The sequence to be used on the customer's next invoice. Defaults to 1. */ - next_invoice_sequence?: number; - payment_method?: string; - /** The customer's phone number. */ - phone?: string; - /** Customer's preferred languages, ordered by preference. */ - preferred_locales?: string[]; - /** The customer's shipping information. Appears on invoices emailed to this customer. */ - shipping?: Partial<{ - address: { - city?: string; - country?: string; - line1: string; - line2?: string; - postal_code?: string; - state?: string; - }; - name: string; - phone?: string; - }> & - Partial<"">; - source?: string; - /** The customer's tax exemption. One of `none`, `exempt`, or `reverse`. */ - tax_exempt?: "" | "exempt" | "none" | "reverse"; - /** The customer's tax IDs. */ - tax_id_data?: { - 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; - }[]; }; }; }; - /**

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

*/ - GetCustomersCustomer: { + /**

Retrieves the coupon with the given ID.

*/ + GetCouponsCoupon: { parameters: { path: { - customer: string; + coupon: string; }; query: { /** Specifies which fields in the response should be expanded. */ @@ -15084,180 +14698,96 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": Partial & - Partial; + content: { + "application/json": components["schemas"]["coupon"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /** - *

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: { + /**

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

*/ + PostCouponsCoupon: { parameters: { path: { - customer: string; + coupon: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["customer"]; + content: { + "application/json": components["schemas"]["coupon"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** The customer's address. */ - address?: Partial<{ - city?: string; - country?: string; - line1: string; - line2?: string; - postal_code?: string; - state?: string; - }> & - Partial<"">; - /** 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; - /** 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?: Partial<{ - account_holder_name?: string; - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - object?: "bank_account"; - routing_number?: string; - }> & - Partial; - /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ - card?: Partial<{ - 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 }; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** 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; - number: string; - object?: "card"; - }> & - Partial; - coupon?: string; - /** ID of Alipay account to make the customer's new default for invoice payments. */ - default_alipay_account?: string; - /** ID of bank account to make the customer's new default for invoice payments. */ - default_bank_account?: string; - /** ID of card to make the customer's new default for invoice payments. */ - default_card?: string; - /** - * 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; - /** An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. */ - description?: string; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. */ - invoice_prefix?: string; - /** Default invoice settings for this customer. */ - invoice_settings?: { - custom_fields?: Partial< - { - name: string; - value: string; - }[] - > & - Partial<"">; - default_payment_method?: string; - footer?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** The customer's full name or business name. */ - name?: string; - /** The sequence to be used on the customer's next invoice. Defaults to 1. */ - next_invoice_sequence?: number; - /** The customer's phone number. */ - phone?: string; - /** Customer's preferred languages, ordered by preference. */ - preferred_locales?: string[]; - /** The customer's shipping information. Appears on invoices emailed to this customer. */ - shipping?: Partial<{ - address: { - city?: string; - country?: string; - line1: string; - line2?: string; - postal_code?: string; - state?: string; - }; - name: string; - phone?: string; - }> & - Partial<"">; - source?: string; - /** The customer's tax exemption. One of `none`, `exempt`, or `reverse`. */ - tax_exempt?: "" | "exempt" | "none" | "reverse"; - /** 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?: Partial<"now"> & Partial; }; }; }; - /**

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

*/ - DeleteCustomersCustomer: { + /**

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: { - customer: string; + coupon: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_customer"]; + content: { + "application/json": components["schemas"]["deleted_coupon"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

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

*/ - GetCustomersCustomerBalanceTransactions: { + /**

Returns a list of credit notes.

*/ + GetCreditNotes: { parameters: { - path: { - customer: string; - }; 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. */ @@ -15267,118 +14797,234 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - /** Details about each object. */ - data: components["schemas"]["customer_balance_transaction"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["credit_note"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /**

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

*/ - PostCustomersCustomerBalanceTransactions: { - parameters: { - path: { - customer: string; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; + }; + /** + *

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: { - "application/json": components["schemas"]["customer_balance_transaction"]; + content: { + "application/json": components["schemas"]["credit_note"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** 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; - /** An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + content: { + "application/x-www-form-urlencoded": { + /** 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?: Partial & Partial<"">; + type: "custom_line_item" | "invoice_line_item"; + unit_amount?: number; + unit_amount_decimal?: string; + }[]; + /** 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?: { [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; + }; }; }; }; - /**

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

*/ - GetCustomersCustomerBalanceTransactionsTransaction: { + /**

Get a preview of a credit note without creating it.

*/ + GetCreditNotesPreview: { parameters: { - path: { - customer: string; - transaction: string; - }; 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?: Partial & Partial<"">; + type: "custom_line_item" | "invoice_line_item"; + unit_amount?: number; + unit_amount_decimal?: string; + }[]; + /** 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?: { [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: { - "application/json": components["schemas"]["customer_balance_transaction"]; + content: { + "application/json": components["schemas"]["credit_note"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

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

*/ - PostCustomersCustomerBalanceTransactionsTransaction: { + /**

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: { - path: { - customer: string; - transaction: string; + 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?: Partial & Partial<"">; + type: "custom_line_item" | "invoice_line_item"; + unit_amount?: number; + unit_amount_decimal?: string; + }[]; + /** 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?: { [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: { - "application/json": components["schemas"]["customer_balance_transaction"]; + content: { + "application/json": { + /** Details about each object. */ + data: components["schemas"]["credit_note_line_item"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; - /**

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: { + /**

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: { - customer: string; + 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. */ @@ -15394,244 +15040,140 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - /** Details about each object. */ - data: components["schemas"]["bank_account"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + /** Details about each object. */ + data: components["schemas"]["credit_note_line_item"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /** - *

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: { + /**

Retrieves the credit note object with the given identifier.

*/ + GetCreditNotesId: { parameters: { - path: { - customer: string; - }; - }; - responses: { - /** Successful response. */ - 200: { - "application/json": components["schemas"]["payment_source"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { - /** A token returned by [Stripe.js](https://stripe.com/docs/stripe.js) representing the user’s Alipay account details. */ - alipay_account?: string; - /** 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?: Partial<{ - account_holder_name?: string; - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - object?: "bank_account"; - routing_number?: string; - }> & - Partial; - /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ - card?: Partial<{ - 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; - object?: "card"; - }> & - Partial; + query: { /** Specifies which fields in the response should be expanded. */ expand?: 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?: { [key: string]: string }; - /** 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: { - "application/json": components["schemas"]["bank_account"]; + content: { + "application/json": components["schemas"]["credit_note"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /**

Update a specified source for a given customer.

*/ - PostCustomersCustomerBankAccountsId: { - parameters: { - path: { - customer: string; - id: string; - }; - }; - responses: { - /** Successful response. */ - 200: { - "application/json": Partial & - Partial & - Partial; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { - /** The name of the person or business that owns the bank account. */ - account_holder_name?: string; - /** The type of entity that holds the account. This can be either `individual` or `company`. */ - account_holder_type?: "company" | "individual"; - /** City/District/Suburb/Town/Village. */ - address_city?: string; - /** Billing address country, if provided when creating card. */ - address_country?: string; - /** Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string; - /** Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string; - /** State/County/Province/Region. */ - address_state?: string; - /** ZIP or postal code. */ - address_zip?: string; - /** Two digit number representing the card’s expiration month. */ - exp_month?: string; - /** Four digit number representing the card’s expiration year. */ - exp_year?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** Cardholder name. */ - name?: string; - owner?: { - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - email?: string; - name?: string; - phone?: string; - }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; - /**

Delete a specified source for a given customer.

*/ - DeleteCustomersCustomerBankAccountsId: { + /**

Updates an existing credit note.

*/ + PostCreditNotesId: { parameters: { path: { - customer: string; id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": Partial & - Partial; + content: { + "application/json": components["schemas"]["credit_note"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Credit note memo. */ + 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?: { [key: string]: string }; + }; }; }; }; - /**

Verify a specified bank account for a given customer.

*/ - PostCustomersCustomerBankAccountsIdVerify: { + /**

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

*/ + PostCreditNotesIdVoid: { parameters: { path: { - customer: string; id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["bank_account"]; + content: { + "application/json": components["schemas"]["credit_note"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ - amounts?: number[]; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + content: { + "application/x-www-form-urlencoded": { + /** 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: { + /**

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

*/ + GetCustomers: { parameters: { - path: { - customer: string; - }; query: { + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; + /** 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; /** Specifies which fields in the response should be expanded. */ @@ -15645,95 +15187,148 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["card"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["customer"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /** - *

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; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; + }; + /**

Creates a new customer object.

*/ + PostCustomers: { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["payment_source"]; + content: { + "application/json": components["schemas"]["customer"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** A token returned by [Stripe.js](https://stripe.com/docs/stripe.js) representing the user’s Alipay account details. */ - alipay_account?: string; - /** 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?: Partial<{ - account_holder_name?: string; - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - object?: "bank_account"; - routing_number?: string; - }> & - Partial; - /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ - card?: Partial<{ - 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 }; + content: { + "application/x-www-form-urlencoded": { + /** The customer's address. */ + address?: Partial<{ + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + }> & + Partial<"">; + /** 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; + /** An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. */ + description?: string; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. */ + invoice_prefix?: string; + /** Default invoice settings for this customer. */ + invoice_settings?: { + custom_fields?: Partial< + { + name: string; + value: string; + }[] + > & + Partial<"">; + default_payment_method?: string; + footer?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** The customer's full name or business name. */ name?: string; - number: string; - object?: "card"; - }> & - Partial; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: { [key: string]: string }; - /** Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - source?: string; + /** The sequence to be used on the customer's next invoice. Defaults to 1. */ + next_invoice_sequence?: number; + payment_method?: string; + /** The customer's phone number. */ + phone?: string; + /** Customer's preferred languages, ordered by preference. */ + preferred_locales?: string[]; + /** The customer's shipping information. Appears on invoices emailed to this customer. */ + shipping?: Partial<{ + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + }; + name: string; + phone?: string; + }> & + Partial<"">; + source?: string; + /** The customer's tax exemption. One of `none`, `exempt`, or `reverse`. */ + tax_exempt?: "" | "exempt" | "none" | "reverse"; + /** The customer's tax IDs. */ + tax_id_data?: { + 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; + }[]; + }; }; }; }; - /**

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: { + /**

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

*/ + GetCustomersCustomer: { parameters: { path: { customer: string; - id: string; }; query: { /** Specifies which fields in the response should be expanded. */ @@ -15743,133 +15338,235 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["card"]; + content: { + "application/json": Partial & + Partial; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

Update a specified source for a given customer.

*/ - PostCustomersCustomerCardsId: { + /** + *

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; - id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": Partial & - Partial & - Partial; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { - /** The name of the person or business that owns the bank account. */ - account_holder_name?: string; - /** The type of entity that holds the account. This can be either `individual` or `company`. */ - account_holder_type?: "company" | "individual"; - /** City/District/Suburb/Town/Village. */ - address_city?: string; - /** Billing address country, if provided when creating card. */ - address_country?: string; - /** Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string; - /** Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string; - /** State/County/Province/Region. */ - address_state?: string; - /** ZIP or postal code. */ - address_zip?: string; - /** Two digit number representing the card’s expiration month. */ - exp_month?: string; - /** Four digit number representing the card’s expiration year. */ - exp_year?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** Cardholder name. */ - name?: string; - owner?: { - address?: { + content: { + "application/json": components["schemas"]["customer"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** The customer's address. */ + address?: Partial<{ city?: string; country?: string; - line1?: string; + line1: string; line2?: string; postal_code?: string; state?: string; - }; + }> & + Partial<"">; + /** 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; + /** 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?: Partial<{ + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + }> & + Partial; + /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ + card?: Partial<{ + 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; + object?: "card"; + }> & + Partial; + coupon?: string; + /** ID of Alipay account to make the customer's new default for invoice payments. */ + default_alipay_account?: string; + /** ID of bank account to make the customer's new default for invoice payments. */ + default_bank_account?: string; + /** ID of card to make the customer's new default for invoice payments. */ + default_card?: string; + /** + * 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; + /** An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. */ + description?: string; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. */ + invoice_prefix?: string; + /** Default invoice settings for this customer. */ + invoice_settings?: { + custom_fields?: Partial< + { + name: string; + value: string; + }[] + > & + Partial<"">; + default_payment_method?: string; + footer?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** The customer's full name or business name. */ name?: string; + /** The sequence to be used on the customer's next invoice. Defaults to 1. */ + next_invoice_sequence?: number; + /** The customer's phone number. */ phone?: string; + /** Customer's preferred languages, ordered by preference. */ + preferred_locales?: string[]; + /** The customer's shipping information. Appears on invoices emailed to this customer. */ + shipping?: Partial<{ + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + }; + name: string; + phone?: string; + }> & + Partial<"">; + source?: string; + /** The customer's tax exemption. One of `none`, `exempt`, or `reverse`. */ + tax_exempt?: "" | "exempt" | "none" | "reverse"; + /** 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?: Partial<"now"> & Partial; }; }; }; }; - /**

Delete a specified source for a given customer.

*/ - DeleteCustomersCustomerCardsId: { + /**

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

*/ + DeleteCustomersCustomer: { parameters: { path: { customer: string; - id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": Partial & - Partial; + content: { + "application/json": components["schemas"]["deleted_customer"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; - GetCustomersCustomerDiscount: { + /**

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

*/ + 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: { - "application/json": components["schemas"]["discount"]; + content: { + "application/json": { + /** Details about each object. */ + data: components["schemas"]["customer_balance_transaction"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

Removes the currently applied discount on a customer.

*/ - DeleteCustomersCustomerDiscount: { + /**

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

*/ + PostCustomersCustomerBalanceTransactions: { parameters: { path: { customer: string; @@ -15878,245 +15575,251 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_discount"]; + content: { + "application/json": components["schemas"]["customer_balance_transaction"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { + /** 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; + /** 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; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + }; + }; }; }; - /**

List sources for a specified customer.

*/ - GetCustomersCustomerSources: { + /**

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

*/ + GetCustomersCustomerBalanceTransactionsTransaction: { parameters: { path: { customer: string; + transaction: 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: { - "application/json": { - /** Details about each object. */ - data: (Partial & - Partial & - Partial & - Partial & - Partial)[]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": components["schemas"]["customer_balance_transaction"]; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /** - *

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: { + /**

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

*/ + PostCustomersCustomerBalanceTransactionsTransaction: { parameters: { path: { customer: string; + transaction: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["payment_source"]; + content: { + "application/json": components["schemas"]["customer_balance_transaction"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** A token returned by [Stripe.js](https://stripe.com/docs/stripe.js) representing the user’s Alipay account details. */ - alipay_account?: string; - /** 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?: Partial<{ - account_holder_name?: string; - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - object?: "bank_account"; - routing_number?: string; - }> & - Partial; - /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ - card?: Partial<{ - 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; - object?: "card"; - }> & - Partial; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: { [key: string]: string }; - /** Please refer to full [documentation](https://stripe.com/docs/api) instead. */ - source?: string; + content: { + "application/x-www-form-urlencoded": { + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + }; }; }; }; - /**

Retrieve a specified source for a given customer.

*/ - GetCustomersCustomerSourcesId: { + /**

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; - id: 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: { - "application/json": components["schemas"]["payment_source"]; + content: { + "application/json": { + /** Details about each object. */ + data: components["schemas"]["bank_account"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

Update a specified source for a given customer.

*/ - PostCustomersCustomerSourcesId: { + /** + *

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; - id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": Partial & - Partial & - Partial; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { - /** The name of the person or business that owns the bank account. */ - account_holder_name?: string; - /** The type of entity that holds the account. This can be either `individual` or `company`. */ - account_holder_type?: "company" | "individual"; - /** City/District/Suburb/Town/Village. */ - address_city?: string; - /** Billing address country, if provided when creating card. */ - address_country?: string; - /** Address line 1 (Street address/PO Box/Company name). */ - address_line1?: string; - /** Address line 2 (Apartment/Suite/Unit/Building). */ - address_line2?: string; - /** State/County/Province/Region. */ - address_state?: string; - /** ZIP or postal code. */ - address_zip?: string; - /** Two digit number representing the card’s expiration month. */ - exp_month?: string; - /** Four digit number representing the card’s expiration year. */ - exp_year?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** Cardholder name. */ - name?: string; - owner?: { - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - email?: string; - name?: string; - phone?: string; + content: { + "application/json": components["schemas"]["payment_source"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** A token returned by [Stripe.js](https://stripe.com/docs/stripe.js) representing the user’s Alipay account details. */ + alipay_account?: string; + /** 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?: Partial<{ + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + }> & + Partial; + /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ + card?: Partial<{ + 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; + object?: "card"; + }> & + Partial; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [key: string]: string }; + /** Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + source?: string; }; }; }; }; - /**

Delete a specified source for a given customer.

*/ - DeleteCustomersCustomerSourcesId: { + /**

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: { - "application/json": Partial & - Partial; + content: { + "application/json": components["schemas"]["bank_account"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; - /**

Verify a specified bank account for a given customer.

*/ - PostCustomersCustomerSourcesIdVerify: { + /**

Update a specified source for a given customer.

*/ + PostCustomersCustomerBankAccountsId: { parameters: { path: { customer: string; @@ -16126,422 +15829,415 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["bank_account"]; + content: { + "application/json": Partial & + Partial & + Partial; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ - amounts?: number[]; - /** 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; + content: { + "application/x-www-form-urlencoded": { + /** The name of the person or business that owns the bank account. */ + account_holder_name?: string; + /** The type of entity that holds the account. This can be either `individual` or `company`. */ + account_holder_type?: "company" | "individual"; + /** City/District/Suburb/Town/Village. */ + address_city?: string; + /** Billing address country, if provided when creating card. */ + address_country?: string; + /** Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string; + /** Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string; + /** State/County/Province/Region. */ + address_state?: string; + /** ZIP or postal code. */ + address_zip?: string; + /** Two digit number representing the card’s expiration month. */ + exp_month?: string; + /** Four digit number representing the card’s expiration year. */ + exp_year?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** Cardholder name. */ + name?: string; + owner?: { + 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: { - "application/json": { - /** Details about each object. */ - data: components["schemas"]["subscription"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": Partial & + Partial; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; + }; }; }; - /**

Creates a new subscription on an existing customer.

*/ - PostCustomersCustomerSubscriptions: { + /**

Verify a specified bank account for a given customer.

*/ + PostCustomersCustomerBankAccountsIdVerify: { parameters: { path: { customer: string; + id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["subscription"]; + content: { + "application/json": components["schemas"]["bank_account"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** 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; - /** 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; - /** 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?: Partial<{ - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - }> & - Partial<"">; - /** 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; - /** Boolean indicating whether this subscription should cancel at the end of the current period. */ - cancel_at_period_end?: boolean; - /** 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`. */ - collection_method?: "charge_automatically" | "send_invoice"; - /** 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; - /** 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; - /** 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; - /** 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; - /** 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?: Partial & Partial<"">; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** A list of up to 20 subscription items, each with an attached plan. */ - items?: { - billing_thresholds?: Partial<{ - usage_gte: number; - }> & - Partial<"">; - metadata?: { [key: string]: string }; - plan?: string; - quantity?: number; - tax_rates?: Partial & Partial<"">; - }[]; - /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; - /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean; - /** - * 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. - */ - payment_behavior?: - | "allow_incomplete" - | "error_if_incomplete" - | "pending_if_incomplete"; - /** 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?: Partial<{ - interval: "day" | "month" | "week" | "year"; - interval_count?: number; - }> & - Partial<"">; - /** 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; - /** - * 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`. - */ - proration_behavior?: "always_invoice" | "create_prorations" | "none"; - /** 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?: Partial & Partial<"">; - /** 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?: Partial<"now"> & Partial; - /** 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; - /** 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; + content: { + "application/x-www-form-urlencoded": { + /** Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ + amounts?: number[]; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; }; }; }; - /**

Retrieves the subscription with the given ID.

*/ - GetCustomersCustomerSubscriptionsSubscriptionExposedId: { + /** + *

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; - subscription_exposed_id: 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: { - "application/json": components["schemas"]["subscription"]; + content: { + "application/json": { + data: components["schemas"]["card"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

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: { + /** + *

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; - subscription_exposed_id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["subscription"]; + content: { + "application/json": components["schemas"]["payment_source"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** 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). */ - billing_cycle_anchor?: "now" | "unchanged"; - /** 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?: Partial<{ - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - }> & - Partial<"">; - /** 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?: Partial & Partial<"">; - /** Boolean indicating whether this subscription should cancel at the end of the current period. */ - cancel_at_period_end?: boolean; - /** 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`. */ - collection_method?: "charge_automatically" | "send_invoice"; - /** 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; - /** 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; - /** 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; - /** 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; - /** 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?: Partial & Partial<"">; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** List of subscription items, each with an attached plan. */ - items?: { - billing_thresholds?: Partial<{ - usage_gte: number; + content: { + "application/x-www-form-urlencoded": { + /** A token returned by [Stripe.js](https://stripe.com/docs/stripe.js) representing the user’s Alipay account details. */ + alipay_account?: string; + /** 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?: Partial<{ + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; }> & - Partial<"">; - clear_usage?: boolean; - deleted?: boolean; - id?: string; - metadata?: Partial<{ [key: string]: string }> & Partial<"">; - plan?: string; - quantity?: number; - tax_rates?: Partial & Partial<"">; - }[]; - /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; - /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean; - /** If specified, payment collection for this subscription will be paused. */ - pause_collection?: Partial<{ - behavior: "keep_as_draft" | "mark_uncollectible" | "void"; - resumes_at?: number; - }> & - Partial<"">; - /** - * 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. - */ - payment_behavior?: - | "allow_incomplete" - | "error_if_incomplete" - | "pending_if_incomplete"; - /** 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?: Partial<{ - interval: "day" | "month" | "week" | "year"; - interval_count?: number; - }> & - Partial<"">; - /** 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; - /** - * 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`. - */ - proration_behavior?: "always_invoice" | "create_prorations" | "none"; - /** 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; - /** 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?: Partial & Partial<"">; - /** 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?: Partial<"now"> & Partial; - /** 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; + Partial; + /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ + card?: Partial<{ + 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; + object?: "card"; + }> & + Partial; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [key: string]: string }; + /** Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + source?: string; + }; }; }; }; - /** - *

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: { + /**

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; - subscription_exposed_id: string; + id: string; + }; + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["subscription"]; + content: { + "application/json": components["schemas"]["card"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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; - /** 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; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; - GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount: { + /**

Update a specified source for a given customer.

*/ + PostCustomersCustomerCardsId: { parameters: { path: { customer: string; - subscription_exposed_id: string; - }; - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["discount"]; + content: { + "application/json": Partial & + Partial & + Partial; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { + /** The name of the person or business that owns the bank account. */ + account_holder_name?: string; + /** The type of entity that holds the account. This can be either `individual` or `company`. */ + account_holder_type?: "company" | "individual"; + /** City/District/Suburb/Town/Village. */ + address_city?: string; + /** Billing address country, if provided when creating card. */ + address_country?: string; + /** Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string; + /** Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string; + /** State/County/Province/Region. */ + address_state?: string; + /** ZIP or postal code. */ + address_zip?: string; + /** Two digit number representing the card’s expiration month. */ + exp_month?: string; + /** Four digit number representing the card’s expiration year. */ + exp_year?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** Cardholder name. */ + name?: string; + owner?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + email?: string; + name?: string; + phone?: string; + }; + }; + }; }; }; - /**

Removes the currently applied discount on a customer.

*/ - DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount: { + /**

Delete a specified source for a given customer.

*/ + DeleteCustomersCustomerCardsId: { parameters: { path: { customer: string; - subscription_exposed_id: string; + id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_discount"]; + content: { + "application/json": Partial & + Partial; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; + }; }; }; - /**

Returns a list of tax IDs for a customer.

*/ - GetCustomersCustomerTaxIds: { + GetCustomersCustomerDiscount: { 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: { - "application/json": { - /** Details about each object. */ - data: components["schemas"]["tax_id"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": components["schemas"]["discount"]; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

Creates a new TaxID object for a customer.

*/ - PostCustomersCustomerTaxIds: { + /**

Removes the currently applied discount on a customer.

*/ + DeleteCustomersCustomerDiscount: { parameters: { path: { customer: string; @@ -16550,147 +16246,151 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["tax_id"]; + content: { + "application/json": components["schemas"]["deleted_discount"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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` */ - 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 of the tax ID. */ - value: string; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; - /**

Retrieves the TaxID object with the given identifier.

*/ - GetCustomersCustomerTaxIdsId: { + /**

List sources for a specified customer.

*/ + GetCustomersCustomerSources: { parameters: { path: { customer: string; - id: 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: { - "application/json": components["schemas"]["tax_id"]; + content: { + "application/json": { + /** Details about each object. */ + data: (Partial & + Partial & + Partial & + Partial & + Partial)[]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

Deletes an existing TaxID object.

*/ - DeleteCustomersCustomerTaxIdsId: { - parameters: { + /** + *

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; - id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_tax_id"]; + content: { + "application/json": components["schemas"]["payment_source"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /**

Returns a list of your disputes.

*/ - GetDisputes: { - parameters: { - query: { - /** Only return disputes associated to the charge specified by this charge ID. */ - charge?: string; - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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: { - "application/json": { - data: components["schemas"]["dispute"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/x-www-form-urlencoded": { + /** A token returned by [Stripe.js](https://stripe.com/docs/stripe.js) representing the user’s Alipay account details. */ + alipay_account?: string; + /** 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?: Partial<{ + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + }> & + Partial; + /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ + card?: Partial<{ + 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; + object?: "card"; + }> & + Partial; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [key: string]: string }; + /** Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + source?: string; }; }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; }; }; - /**

Retrieves the dispute with the given ID.

*/ - GetDisputesDispute: { + /**

Retrieve a specified source for a given customer.

*/ + GetCustomersCustomerSourcesId: { parameters: { path: { - dispute: string; + customer: string; + id: string; }; query: { /** Specifies which fields in the response should be expanded. */ @@ -16700,167 +16400,165 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["dispute"]; + content: { + "application/json": components["schemas"]["payment_source"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /** - *

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: { + /**

Update a specified source for a given customer.

*/ + PostCustomersCustomerSourcesId: { parameters: { path: { - dispute: string; + customer: string; + id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["dispute"]; + content: { + "application/json": Partial & + Partial & + Partial; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; + content: { + "application/x-www-form-urlencoded": { + /** The name of the person or business that owns the bank account. */ + account_holder_name?: string; + /** The type of entity that holds the account. This can be either `individual` or `company`. */ + account_holder_type?: "company" | "individual"; + /** City/District/Suburb/Town/Village. */ + address_city?: string; + /** Billing address country, if provided when creating card. */ + address_country?: string; + /** Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string; + /** Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string; + /** State/County/Province/Region. */ + address_state?: string; + /** ZIP or postal code. */ + address_zip?: string; + /** Two digit number representing the card’s expiration month. */ + exp_month?: string; + /** Four digit number representing the card’s expiration year. */ + exp_year?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** Cardholder name. */ + name?: string; + owner?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + email?: string; + name?: string; + phone?: string; + }; }; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** 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: { + /**

Delete a specified source for a given customer.

*/ + DeleteCustomersCustomerSourcesId: { parameters: { path: { - dispute: string; - }; - }; - responses: { - /** Successful response. */ - 200: { - "application/json": components["schemas"]["dispute"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + customer: string; + id: string; }; }; - }; - /**

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

*/ - PostEphemeralKeys: { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["ephemeral_key"]; + content: { + "application/json": Partial & + Partial; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** The ID of the Customer you'd like to modify using the resulting ephemeral key. */ - customer?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** The ID of the Issuing Card you'd like to access using the resulting ephemeral key. */ - issuing_card?: string; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; }; }; }; - /**

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

*/ - DeleteEphemeralKeysKey: { + /**

Verify a specified bank account for a given customer.

*/ + PostCustomersCustomerSourcesIdVerify: { parameters: { path: { - key: string; + customer: string; + id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["ephemeral_key"]; + content: { + "application/json": components["schemas"]["bank_account"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + content: { + "application/x-www-form-urlencoded": { + /** Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ + amounts?: number[]; + /** 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: { + /**

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: { - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; - /** 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. */ @@ -16869,274 +16567,398 @@ export interface operations { 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: { - "application/json": { - data: components["schemas"]["event"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + /** Details about each object. */ + data: components["schemas"]["subscription"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

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

*/ - GetEventsId: { + /**

Creates a new subscription on an existing customer.

*/ + PostCustomersCustomerSubscriptions: { parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - }; path: { - id: string; + customer: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["event"]; + content: { + "application/json": components["schemas"]["subscription"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { + /** 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; + /** 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; + /** 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; + /** 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?: Partial<{ + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + }> & + Partial<"">; + /** 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; + /** Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean; + /** 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`. */ + collection_method?: "charge_automatically" | "send_invoice"; + /** 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; + /** 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; + /** 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; + /** 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; + /** 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?: Partial & Partial<"">; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** A list of up to 20 subscription items, each with an attached plan. */ + items?: { + billing_thresholds?: Partial<{ + usage_gte: number; + }> & + Partial<"">; + metadata?: { [key: string]: string }; + plan?: string; + quantity?: number; + tax_rates?: Partial & Partial<"">; + }[]; + /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; + /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean; + /** + * 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. + */ + payment_behavior?: "allow_incomplete" | "error_if_incomplete" | "pending_if_incomplete"; + /** 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?: Partial<{ + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + }> & + Partial<"">; + /** 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; + /** + * 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`. + */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + /** 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?: Partial & Partial<"">; + /** 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?: Partial<"now"> & Partial; + /** 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; + /** 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; + }; + }; }; }; - /**

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: { + /**

Retrieves the subscription with the given ID.

*/ + GetCustomersCustomerSubscriptionsSubscriptionExposedId: { parameters: { + path: { + customer: string; + subscription_exposed_id: string; + }; 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: { - "application/json": { - data: components["schemas"]["exchange_rate"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": components["schemas"]["subscription"]; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

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

*/ - GetExchangeRatesCurrency: { + /**

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: { - currency: string; - }; - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + customer: string; + subscription_exposed_id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["exchange_rate"]; + content: { + "application/json": components["schemas"]["subscription"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /**

Returns a list of file links.

*/ - GetFileLinks: { - parameters: { - query: { - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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: { - "application/json": { - data: components["schemas"]["file_link"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/x-www-form-urlencoded": { + /** 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; + /** 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). */ + billing_cycle_anchor?: "now" | "unchanged"; + /** 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?: Partial<{ + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + }> & + Partial<"">; + /** 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?: Partial & Partial<"">; + /** Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean; + /** 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`. */ + collection_method?: "charge_automatically" | "send_invoice"; + /** 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; + /** 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; + /** 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; + /** 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; + /** 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?: Partial & Partial<"">; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** List of subscription items, each with an attached plan. */ + items?: { + billing_thresholds?: Partial<{ + usage_gte: number; + }> & + Partial<"">; + clear_usage?: boolean; + deleted?: boolean; + id?: string; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; + plan?: string; + quantity?: number; + tax_rates?: Partial & Partial<"">; + }[]; + /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; + /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean; + /** If specified, payment collection for this subscription will be paused. */ + pause_collection?: Partial<{ + behavior: "keep_as_draft" | "mark_uncollectible" | "void"; + resumes_at?: number; + }> & + Partial<"">; + /** + * 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. + */ + payment_behavior?: "allow_incomplete" | "error_if_incomplete" | "pending_if_incomplete"; + /** 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?: Partial<{ + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + }> & + Partial<"">; + /** 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; + /** + * 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`. + */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + /** 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; + /** 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?: Partial & Partial<"">; + /** 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?: Partial<"now"> & Partial; + /** 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; }; }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; }; }; - /**

Creates a new file link object.

*/ - PostFileLinks: { + /** + *

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: { - "application/json": components["schemas"]["file_link"]; + content: { + "application/json": components["schemas"]["subscription"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** A future timestamp after which the link will no longer be usable. */ - expires_at?: number; - /** 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; - /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** 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; + }; }; }; }; - /**

Retrieves the file link with the given ID.

*/ - GetFileLinksLink: { + GetCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount: { parameters: { + path: { + customer: string; + subscription_exposed_id: string; + }; query: { /** Specifies which fields in the response should be expanded. */ expand?: string[]; }; - path: { - link: string; - }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["file_link"]; + content: { + "application/json": components["schemas"]["discount"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

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

*/ - PostFileLinksLink: { + /**

Removes the currently applied discount on a customer.

*/ + DeleteCustomersCustomerSubscriptionsSubscriptionExposedIdDiscount: { parameters: { path: { - link: string; + customer: string; + subscription_exposed_id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["file_link"]; + content: { + "application/json": components["schemas"]["deleted_discount"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. */ - expires_at?: Partial<"now"> & Partial & Partial<"">; - /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; - /**

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: { + /**

Returns a list of tax IDs for a customer.

*/ + GetCustomersCustomerTaxIds: { parameters: { + path: { + customer: string; + }; query: { - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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?: - | "additional_verification" - | "business_icon" - | "business_logo" - | "customer_signature" - | "dispute_evidence" - | "finance_report_run" - | "identity_document" - | "pci_document" - | "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; }; @@ -17144,95 +16966,155 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["file"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + /** Details about each object. */ + data: components["schemas"]["tax_id"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /** - *

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: { + /**

Creates a new TaxID object for a customer.

*/ + PostCustomersCustomerTaxIds: { + parameters: { + path: { + customer: string; + }; + }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["file"]; + content: { + "application/json": components["schemas"]["tax_id"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "multipart/form-data": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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; - /** 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?: Partial<{ [key: string]: string }> & Partial<"">; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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` */ + 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 of the tax ID. */ + value: string; }; - /** 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`. */ - purpose: - | "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: { + /**

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]: any }; + }; + }; + }; + /**

Deletes an existing TaxID object.

*/ + DeleteCustomersCustomerTaxIdsId: { + parameters: { path: { - file: string; + customer: string; + id: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["file"]; + content: { + "application/json": components["schemas"]["deleted_tax_id"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

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: { + /**

Returns a list of your disputes.

*/ + GetDisputes: { parameters: { query: { + /** Only return disputes associated to the charge specified by this charge ID. */ + charge?: string; created?: Partial<{ gt?: number; gte?: number; @@ -17240,18 +17122,14 @@ export interface operations { lte?: number; }> & Partial; - /** 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; + /** 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; }; @@ -17259,170 +17137,227 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["invoiceitem"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["dispute"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

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: { + /**

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: { - "application/json": components["schemas"]["invoiceitem"]; + content: { + "application/json": components["schemas"]["dispute"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** 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; - /** The ID of the customer who will be billed when this invoice item is billed. */ - customer: string; - /** An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. */ - description?: string; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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; - /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; - /** The period associated with this invoice item. */ - period?: { - end: number; - start: number; - }; - /** Non-negative integer. The quantity of units for the invoice item. */ - quantity?: number; - /** 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; - /** 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[]; - /** 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; - /** 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; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; - /**

Retrieves the invoice item with the given ID.

*/ - GetInvoiceitemsInvoiceitem: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - }; + /** + *

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: { - invoiceitem: string; + dispute: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["invoiceitem"]; + content: { + "application/json": components["schemas"]["dispute"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { + /** 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; + }; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** 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; + }; + }; }; }; - /**

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: { + /** + *

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: { - invoiceitem: string; + dispute: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["invoiceitem"]; + content: { + "application/json": components["schemas"]["dispute"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. */ - description?: string; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** The period associated with this invoice item. */ - period?: { - end: number; - start: number; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; }; - /** Non-negative integer. The quantity of units for the invoice item. */ - quantity?: number; - /** 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?: Partial & Partial<"">; - /** 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; - /** 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; }; }; }; - /**

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: { + /**

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": { + /** The ID of the Customer you'd like to modify using the resulting ephemeral key. */ + customer?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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: { - invoiceitem: string; + key: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_invoiceitem"]; + content: { + "application/json": components["schemas"]["ephemeral_key"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; + }; }; }; - /**

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: { + /**

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: { - /** The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`. */ - collection_method?: "charge_automatically" | "send_invoice"; created?: Partial<{ gt?: number; gte?: number; @@ -17430,15 +17365,8 @@ export interface operations { lte?: number; }> & Partial; - /** Only return invoices for the customer specified by this customer ID. */ - customer?: string; - due_date?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; + /** 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. */ @@ -17447,605 +17375,455 @@ export interface operations { 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; + /** 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: { - "application/json": { - data: components["schemas"]["invoice"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["event"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

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: { + /**

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: { - "application/json": components["schemas"]["invoice"]; + content: { + "application/json": components["schemas"]["event"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** 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; - /** 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`. */ - collection_method?: "charge_automatically" | "send_invoice"; - /** A list of up to 4 custom fields to be displayed on the invoice. */ - custom_fields?: Partial< - { - name: string; - value: string; - }[] - > & - Partial<"">; - /** The ID of the customer who will be billed. */ - customer: string; - /** 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; - /** 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; - /** 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; - /** The tax rates that will apply to any line item that does not have `tax_rates` set. */ - default_tax_rates?: string[]; - /** An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ - description?: string; - /** The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`. */ - due_date?: number; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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[]; - /** Footer to be displayed on the invoice. */ - footer?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** 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; - /** 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; - /** 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; + /** 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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** 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]: any }; }; }; }; - /** - *

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: { + /**

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

*/ + GetExchangeRatesCurrency: { parameters: { + path: { + currency: string; + }; query: { - /** 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; /** 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; - invoiceitem?: string; - metadata?: Partial<{ [key: string]: string }> & Partial<"">; - period?: { - end: number; - start: number; - }; - quantity?: number; - tax_rates?: Partial & Partial<"">; - unit_amount?: number; - 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?: Partial<"now" | "unchanged"> & - Partial; - /** 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?: Partial & Partial<"">; - /** 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?: Partial & Partial<"">; - /** List of subscription items, each with an attached plan. */ - subscription_items?: { - billing_thresholds?: Partial<{ - usage_gte: number; - }> & - Partial<"">; - clear_usage?: boolean; - deleted?: boolean; - id?: string; - metadata?: Partial<{ [key: string]: string }> & Partial<"">; - plan?: string; - quantity?: number; - tax_rates?: Partial & Partial<"">; - }[]; - /** 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?: - | "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` 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?: Partial<"now"> & Partial; - /** 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: { - "application/json": components["schemas"]["invoice"]; + content: { + "application/json": components["schemas"]["exchange_rate"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

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: { + /**

Returns a list of file links.

*/ + GetFileLinks: { parameters: { query: { - /** 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; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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; - invoiceitem?: string; - metadata?: Partial<{ [key: string]: string }> & Partial<"">; - period?: { - end: number; - start: number; - }; - quantity?: number; - tax_rates?: Partial & Partial<"">; - unit_amount?: number; - 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. */ + /** 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; - /** 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?: Partial<"now" | "unchanged"> & - Partial; - /** 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?: Partial & Partial<"">; - /** 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?: Partial & Partial<"">; - /** List of subscription items, each with an attached plan. */ - subscription_items?: { - billing_thresholds?: Partial<{ - usage_gte: number; - }> & - Partial<"">; - clear_usage?: boolean; - deleted?: boolean; - id?: string; - metadata?: Partial<{ [key: string]: string }> & Partial<"">; - plan?: string; - quantity?: number; - tax_rates?: Partial & Partial<"">; - }[]; - /** 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?: - | "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` 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?: Partial<"now"> & Partial; - /** 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: { - "application/json": { - /** Details about each object. */ - data: components["schemas"]["line_item"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["file_link"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /**

Retrieves the invoice with the given ID.

*/ - GetInvoicesInvoice: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - }; - path: { - invoice: string; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; + }; + /**

Creates a new file link object.

*/ + PostFileLinks: { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["invoice"]; + content: { + "application/json": components["schemas"]["file_link"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** A future timestamp after which the link will no longer be usable. */ + expires_at?: number; + /** 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; + /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; + }; + }; }; }; - /** - *

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: { + /**

Retrieves the file link with the given ID.

*/ + GetFileLinksLink: { parameters: { - path: { - invoice: string; - }; - }; - responses: { - /** Successful response. */ - 200: { - "application/json": components["schemas"]["invoice"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. */ - auto_advance?: boolean; - /** Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices. */ - collection_method?: "charge_automatically" | "send_invoice"; - /** 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?: Partial< - { - name: string; - value: string; - }[] - > & - Partial<"">; - /** 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; - /** 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; - /** 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; - /** 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?: Partial & Partial<"">; - /** An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ - description?: string; - /** 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; + query: { /** Specifies which fields in the response should be expanded. */ expand?: string[]; - /** Footer to be displayed on the invoice. */ - footer?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** 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; - /** 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?: Partial & Partial<"">; }; - }; - }; - /**

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; + link: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_invoice"]; + content: { + "application/json": components["schemas"]["file_link"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

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: { + /**

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

*/ + PostFileLinksLink: { parameters: { path: { - invoice: string; + link: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["invoice"]; + content: { + "application/json": components["schemas"]["file_link"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. */ + expires_at?: Partial<"now"> & Partial & Partial<"">; + /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; + }; }; }; }; - /**

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: { + /**

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?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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?: + | "additional_verification" + | "business_icon" + | "business_logo" + | "customer_signature" + | "dispute_evidence" + | "finance_report_run" + | "identity_document" + | "pci_document" + | "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; }; - path: { - invoice: string; - }; }; responses: { /** Successful response. */ 200: { - "application/json": { - /** Details about each object. */ - data: components["schemas"]["line_item"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["file"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /**

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: { - "application/json": components["schemas"]["invoice"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { - /** 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: { - "application/json": components["schemas"]["invoice"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** - * 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; - /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean; - /** Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. */ - paid_out_of_band?: boolean; - /** 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; - /** 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; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; /** - *

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.

+ *

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.

* - *

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

+ *

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

*/ - PostInvoicesInvoiceSend: { - parameters: { - path: { - invoice: string; - }; - }; + PostFiles: { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["invoice"]; + content: { + "application/json": components["schemas"]["file"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + content: { + "multipart/form-data": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** 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?: Partial<{ [key: string]: string }> & Partial<"">; + }; + /** 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`. */ + purpose: + | "additional_verification" + | "business_icon" + | "business_logo" + | "customer_signature" + | "dispute_evidence" + | "identity_document" + | "pci_document" + | "tax_document_user_upload"; + }; }; }; }; - /**

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: { + /**

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: { - invoice: string; + file: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["invoice"]; + content: { + "application/json": components["schemas"]["file"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; - /**

Returns a list of issuer fraud records.

*/ - GetIssuerFraudRecords: { + /**

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: { - /** Only return issuer fraud records for the charge specified by this charge ID. */ - charge?: string; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; + /** 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; }; @@ -18053,214 +17831,200 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["issuer_fraud_record"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["invoiceitem"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /** - *

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; - }; - }; + /**

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: { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["issuer_fraud_record"]; + content: { + "application/json": components["schemas"]["invoiceitem"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /**

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 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?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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: { - "application/json": { - data: components["schemas"]["issuing.authorization"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/x-www-form-urlencoded": { + /** 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; + /** 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; + /** The ID of the customer who will be billed when this invoice item is billed. */ + customer: string; + /** An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. */ + description?: string; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; + /** The period associated with this invoice item. */ + period?: { + end: number; + start: number; + }; + /** Non-negative integer. The quantity of units for the invoice item. */ + quantity?: number; + /** 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; + /** 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[]; + /** 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; + /** 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; }; }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; }; }; - /**

Retrieves an Issuing Authorization object.

*/ - GetIssuingAuthorizationsAuthorization: { + /**

Retrieves the invoice item with the given ID.

*/ + GetInvoiceitemsInvoiceitem: { parameters: { - path: { - authorization: string; - }; query: { /** Specifies which fields in the response should be expanded. */ expand?: string[]; }; - }; - responses: { - /** Successful response. */ - 200: { - "application/json": components["schemas"]["issuing.authorization"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /**

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; + invoiceitem: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["issuing.authorization"]; + content: { + "application/json": components["schemas"]["invoiceitem"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; - /**

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

*/ - PostIssuingAuthorizationsAuthorizationApprove: { + /**

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: { - authorization: string; + invoiceitem: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["issuing.authorization"]; + content: { + "application/json": components["schemas"]["invoiceitem"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + content: { + "application/x-www-form-urlencoded": { + /** 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; + /** An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. */ + description?: string; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** The period associated with this invoice item. */ + period?: { + end: number; + start: number; + }; + /** Non-negative integer. The quantity of units for the invoice item. */ + quantity?: number; + /** 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?: Partial & Partial<"">; + /** 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; + /** 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; + }; }; }; }; - /**

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

*/ - PostIssuingAuthorizationsAuthorizationDecline: { + /**

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: { - authorization: string; + invoiceitem: string; }; }; responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["issuing.authorization"]; + content: { + "application/json": components["schemas"]["deleted_invoiceitem"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; }; }; }; - /**

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: { + /**

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: { - /** Only return cardholders that were created during the given date interval. */ + /** The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`. */ + collection_method?: "charge_automatically" | "send_invoice"; created?: Partial<{ gt?: number; gte?: number; @@ -18268,3585 +18032,4272 @@ export interface operations { lte?: number; }> & Partial; - /** Only return cardholders that have the given email address. */ - email?: string; + /** Only return invoices for the customer specified by this customer ID. */ + customer?: string; + due_date?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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"; + /** 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: { - "application/json": { - data: components["schemas"]["issuing.cardholder"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["invoice"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; - /**

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

*/ - PostIssuingCardholders: { + /**

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: { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["issuing.cardholder"]; + content: { + "application/json": components["schemas"]["invoice"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** The cardholder's billing address. */ - billing: { - address: { - city: string; - country: string; - line1: string; - line2?: string; - postal_code: string; - state?: string; - }; - }; - /** Additional information about a `company` cardholder. */ - company?: { - tax_id?: string; + content: { + "application/x-www-form-urlencoded": { + /** 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; + /** 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; + /** 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`. */ + collection_method?: "charge_automatically" | "send_invoice"; + /** A list of up to 4 custom fields to be displayed on the invoice. */ + custom_fields?: Partial< + { + name: string; + value: string; + }[] + > & + Partial<"">; + /** The ID of the customer who will be billed. */ + customer: string; + /** 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; + /** 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; + /** 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; + /** The tax rates that will apply to any line item that does not have `tax_rates` set. */ + default_tax_rates?: string[]; + /** An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ + description?: string; + /** The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`. */ + due_date?: number; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Footer to be displayed on the invoice. */ + footer?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** 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; + /** 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; + /** 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; }; - /** The cardholder's email address. */ - email?: 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 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: { + /** 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; /** Specifies which fields in the response should be expanded. */ expand?: string[]; - /** Additional information about an `individual` cardholder. */ - individual?: { - dob?: { - day: number; - month: number; - year: number; - }; - first_name: string; - last_name: string; - verification?: { - document?: { - back?: string; - front?: string; - }; + /** List of invoice items to add or update in the upcoming invoice preview. */ + invoice_items?: { + amount?: number; + currency?: string; + description?: string; + discountable?: boolean; + invoiceitem?: string; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; + period?: { + end: number; + start: number; }; - }; - /** Set of key-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]: string }; - /** The cardholder's name. This will be printed on cards issued to them. */ - name: string; - /** 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; - /** 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" - )[]; - interval: - | "all_time" - | "daily" - | "monthly" - | "per_authorization" - | "weekly" - | "yearly"; - }[]; - spending_limits_currency?: string; - }; - /** Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`. */ - status?: "active" | "inactive"; - /** One of `individual` or `company`. */ - 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: { - "application/json": components["schemas"]["issuing.cardholder"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /**

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: { - "application/json": components["schemas"]["issuing.cardholder"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { - /** The cardholder's billing address. */ - billing?: { - address: { - city: string; - country: string; - line1: string; - line2?: string; - postal_code: string; - state?: string; - }; - }; - /** Additional information about a `company` cardholder. */ - company?: { - tax_id?: string; - }; - /** The cardholder's email address. */ - email?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** Additional information about an `individual` cardholder. */ - individual?: { - dob?: { - day: number; - month: number; - year: number; - }; - first_name: string; - last_name: string; - verification?: { - document?: { - back?: string; - front?: 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?: { [key: string]: string }; - /** The cardholder's phone number. */ - phone_number?: string; - /** 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" - )[]; - interval: - | "all_time" - | "daily" - | "monthly" - | "per_authorization" - | "weekly" - | "yearly"; - }[]; - spending_limits_currency?: string; - }; - /** Specifies whether to permit authorizations on this cardholder's cards. */ - 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?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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: { - "application/json": { - data: components["schemas"]["issuing.card"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; - }; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /**

Creates an Issuing Card object.

*/ - PostIssuingCards: { - responses: { - /** Successful response. */ - 200: { - "application/json": components["schemas"]["issuing.card"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { - /** The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated. */ - cardholder?: string; - /** The currency for the card. This currently must be `usd`. */ - currency: string; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: { [key: string]: string }; - /** The card this is meant to be a replacement for (if any). */ - replacement_for?: string; - /** If `replacement_for` is specified, this should indicate why that card is being replaced. */ - replacement_reason?: "damaged" | "expired" | "lost" | "stolen"; - /** The address where the card will be shipped. */ - shipping?: { - address: { - city: string; - country: string; - line1: string; - line2?: string; - postal_code: string; - state?: string; - }; - name: string; - service?: "express" | "priority" | "standard"; - type?: "bulk" | "individual"; - }; - /** 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" - )[]; - interval: - | "all_time" - | "daily" - | "monthly" - | "per_authorization" - | "weekly" - | "yearly"; - }[]; - }; - /** Whether authorizations can be approved on this card. Defaults to `inactive`. */ - status?: "active" | "inactive"; - /** The type of card to issue. Possible values are `physical` or `virtual`. */ - 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: { - "application/json": components["schemas"]["issuing.card"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /**

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: { - "application/json": components["schemas"]["issuing.card"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { - /** Reason why the `status` of this card is `canceled`. */ - cancellation_reason?: "lost" | "stolen"; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** 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?: ( + quantity?: number; + tax_rates?: Partial & Partial<"">; + unit_amount?: number; + 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?: Partial<"now" | "unchanged"> & Partial; + /** 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?: Partial & Partial<"">; + /** 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?: Partial & Partial<"">; + /** List of subscription items, each with an attached plan. */ + subscription_items?: { + billing_thresholds?: Partial<{ + usage_gte: number; + }> & + Partial<"">; + clear_usage?: boolean; + deleted?: boolean; + id?: string; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; + plan?: string; + quantity?: number; + tax_rates?: Partial & Partial<"">; + }[]; + /** 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?: "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` 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?: Partial<"now"> & Partial; + /** 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: { + content: { + "application/json": components["schemas"]["invoice"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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: { + /** 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; + /** 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; + invoiceitem?: string; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; + period?: { + end: number; + start: number; + }; + quantity?: number; + tax_rates?: Partial & Partial<"">; + unit_amount?: number; + 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?: Partial<"now" | "unchanged"> & Partial; + /** 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?: Partial & Partial<"">; + /** 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?: Partial & Partial<"">; + /** List of subscription items, each with an attached plan. */ + subscription_items?: { + billing_thresholds?: Partial<{ + usage_gte: number; + }> & + Partial<"">; + clear_usage?: boolean; + deleted?: boolean; + id?: string; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; + plan?: string; + quantity?: number; + tax_rates?: Partial & Partial<"">; + }[]; + /** 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?: "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` 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?: Partial<"now"> & Partial; + /** 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: { + content: { + "application/json": { + /** Details about each object. */ + data: components["schemas"]["line_item"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** 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]: any }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /** + *

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": { + /** 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; + /** Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. */ + auto_advance?: boolean; + /** Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices. */ + collection_method?: "charge_automatically" | "send_invoice"; + /** 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?: Partial< + { + name: string; + value: string; + }[] + > & + Partial<"">; + /** 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; + /** 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; + /** 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; + /** 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?: Partial & Partial<"">; + /** An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ + description?: string; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Footer to be displayed on the invoice. */ + footer?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** 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; + /** 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?: Partial & Partial<"">; + }; + }; + }; + }; + /**

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: { + 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]: any }; + }; + }; + }; + /**

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": { + /** 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; + /** 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": { + /** Details about each object. */ + data: components["schemas"]["line_item"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** 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]: any }; + }; + }; + }; + /**

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": { + /** 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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** + * 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; + /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean; + /** Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. */ + paid_out_of_band?: boolean; + /** 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; + /** 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": { + /** 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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; + }; + }; + }; + /**

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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** 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]: any }; + }; + }; + }; + /** + *

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]: any }; + }; + }; + }; + /**

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 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?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** 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]: any }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + }; + }; + }; + }; + /**

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": { + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + }; + }; + }; + }; + /**

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + }; + }; + }; + }; + /**

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?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; + /** 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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** 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]: any }; + }; + }; + }; + /**

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": { + /** The cardholder's billing address. */ + billing: { + address: { + city: string; + country: string; + line1: string; + line2?: string; + postal_code: string; + state?: string; + }; + }; + /** Additional information about a `company` cardholder. */ + company?: { + tax_id?: string; + }; + /** The cardholder's email address. */ + email?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Additional information about an `individual` cardholder. */ + individual?: { + dob?: { + day: number; + month: number; + year: number; + }; + first_name: string; + last_name: string; + verification?: { + document?: { + back?: string; + front?: 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?: { [key: string]: string }; + /** The cardholder's name. This will be printed on cards issued to them. */ + name: string; + /** 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; + /** 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" + )[]; + interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; + }[]; + spending_limits_currency?: string; + }; + /** Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`. */ + status?: "active" | "inactive"; + /** One of `individual` or `company`. */ + 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]: any }; + }; + }; + }; + /**

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": { + /** The cardholder's billing address. */ + billing?: { + address: { + city: string; + country: string; + line1: string; + line2?: string; + postal_code: string; + state?: string; + }; + }; + /** Additional information about a `company` cardholder. */ + company?: { + tax_id?: string; + }; + /** The cardholder's email address. */ + email?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Additional information about an `individual` cardholder. */ + individual?: { + dob?: { + day: number; + month: number; + year: number; + }; + first_name: string; + last_name: string; + verification?: { + document?: { + back?: string; + front?: 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?: { [key: string]: string }; + /** The cardholder's phone number. */ + phone_number?: string; + /** 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" + )[]; + interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; + }[]; + spending_limits_currency?: string; + }; + /** Specifies whether to permit authorizations on this cardholder's cards. */ + 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?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** 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]: any }; + }; + }; + }; + /**

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": { + /** The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated. */ + cardholder?: string; + /** The currency for the card. This currently must be `usd`. */ + currency: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [key: string]: string }; + /** The card this is meant to be a replacement for (if any). */ + replacement_for?: string; + /** If `replacement_for` is specified, this should indicate why that card is being replaced. */ + replacement_reason?: "damaged" | "expired" | "lost" | "stolen"; + /** The address where the card will be shipped. */ + shipping?: { + address: { + city: string; + country: string; + line1: string; + line2?: string; + postal_code: string; + state?: string; + }; + name: string; + service?: "express" | "priority" | "standard"; + type?: "bulk" | "individual"; + }; + /** 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" + )[]; + interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; + }[]; + }; + /** Whether authorizations can be approved on this card. Defaults to `inactive`. */ + status?: "active" | "inactive"; + /** The type of card to issue. Possible values are `physical` or `virtual`. */ + 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]: any }; + }; + }; + }; + /**

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": { + /** Reason why the `status` of this card is `canceled`. */ + cancellation_reason?: "lost" | "stolen"; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** 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" @@ -22136,17 +22587,304 @@ export interface operations { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[]; - interval: - | "all_time" - | "daily" - | "monthly" - | "per_authorization" - | "weekly" - | "yearly"; - }[]; + 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" + )[]; + interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; + }[]; + }; + /** 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`. */ + status?: "active" | "canceled" | "inactive"; }; - /** 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`. */ - status?: "active" | "canceled" | "inactive"; }; }; }; @@ -22167,23 +22905,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["issuing.dispute"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["issuing.dispute"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Creates an Issuing Dispute object.

*/ @@ -22191,19 +22935,25 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["issuing.dispute"]; + content: { + "application/json": components["schemas"]["issuing.dispute"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: { [key: string]: string }; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [key: string]: string }; + }; }; }; }; @@ -22221,15 +22971,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["issuing.dispute"]; + content: { + "application/json": components["schemas"]["issuing.dispute"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -22242,19 +22998,25 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["issuing.dispute"]; + content: { + "application/json": components["schemas"]["issuing.dispute"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: { [key: string]: string }; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [key: string]: string }; + }; }; }; }; @@ -22283,23 +23045,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["issuing.settlement"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["issuing.settlement"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Retrieves an Issuing Settlement object.

*/ @@ -22316,15 +23084,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["issuing.settlement"]; + content: { + "application/json": components["schemas"]["issuing.settlement"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -22337,19 +23111,25 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["issuing.settlement"]; + content: { + "application/json": components["schemas"]["issuing.settlement"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: { [key: string]: string }; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [key: string]: string }; + }; }; }; }; @@ -22382,23 +23162,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["issuing.transaction"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["issuing.transaction"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Retrieves an Issuing Transaction object.

*/ @@ -22415,15 +23201,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["issuing.transaction"]; + content: { + "application/json": components["schemas"]["issuing.transaction"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -22436,19 +23228,25 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["issuing.transaction"]; + content: { + "application/json": components["schemas"]["issuing.transaction"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + }; }; }; }; @@ -22466,15 +23264,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["mandate"]; + content: { + "application/json": components["schemas"]["mandate"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -22504,23 +23308,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["order_return"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["order_return"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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.

*/ @@ -22537,15 +23347,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["order_return"]; + content: { + "application/json": components["schemas"]["order_return"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -22612,23 +23428,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["order"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["order"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Creates a new order object.

*/ @@ -22636,48 +23458,54 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["order"]; + content: { + "application/json": components["schemas"]["order"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** 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; - /** 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; - /** The email address of the customer placing the order. */ - email?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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; - type?: "discount" | "shipping" | "sku" | "tax"; - }[]; - /** Set of key-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]: string }; - /** Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. */ - shipping?: { - address: { - city?: string; - country?: string; - line1: string; - line2?: string; - postal_code?: string; - state?: string; + content: { + "application/x-www-form-urlencoded": { + /** 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; + /** 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; + /** 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; + /** The email address of the customer placing the order. */ + email?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + type?: "discount" | "shipping" | "sku" | "tax"; + }[]; + /** Set of key-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]: string }; + /** Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. */ + shipping?: { + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + }; + name: string; + phone?: string; }; - name: string; - phone?: string; }; }; }; @@ -22696,15 +23524,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["order"]; + content: { + "application/json": components["schemas"]["order"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -22717,30 +23551,36 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["order"]; + content: { + "application/json": components["schemas"]["order"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** 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; - /** Tracking information once the order has been fulfilled. */ - shipping?: { - carrier: string; - tracking_number: string; + content: { + "application/x-www-form-urlencoded": { + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** 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; + /** Tracking information once the order has been fulfilled. */ + shipping?: { + carrier: string; + tracking_number: string; + }; + /** 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). */ + status?: "canceled" | "created" | "fulfilled" | "paid" | "returned"; }; - /** 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). */ - status?: "canceled" | "created" | "fulfilled" | "paid" | "returned"; }; }; }; @@ -22754,27 +23594,33 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["order"]; + content: { + "application/json": components["schemas"]["order"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** 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; - /** The email address of the customer placing the order. Required if not previously specified for the order. */ - email?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: { [key: string]: string }; - /** 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; + content: { + "application/x-www-form-urlencoded": { + /** 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; + /** 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; + /** The email address of the customer placing the order. Required if not previously specified for the order. */ + email?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [key: string]: string }; + /** 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; + }; }; }; }; @@ -22788,28 +23634,34 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["order_return"]; + content: { + "application/json": components["schemas"]["order_return"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** List of items to return. */ - items?: Partial< - { - amount?: number; - description?: string; - parent?: string; - quantity?: number; - type?: "discount" | "shipping" | "sku" | "tax"; - }[] - > & - Partial<"">; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** List of items to return. */ + items?: Partial< + { + amount?: number; + description?: string; + parent?: string; + quantity?: number; + type?: "discount" | "shipping" | "sku" | "tax"; + }[] + > & + Partial<"">; + }; }; }; }; @@ -22840,23 +23692,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["payment_intent"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["payment_intent"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /** @@ -22875,131 +23733,137 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["payment_intent"]; + content: { + "application/json": components["schemas"]["payment_intent"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** - * 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; - /** Controls when the funds will be captured from the customer's account. */ - capture_method?: "automatic" | "manual"; - /** 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; - confirmation_method?: "automatic" | "manual"; - /** 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; - /** - * 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; - /** An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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; - /** 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: { - accepted_at?: number; - offline?: { [key: string]: any }; - online?: { - ip_address: string; - user_agent: string; + content: { + "application/x-www-form-urlencoded": { + /** 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; + /** + * 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; + /** Controls when the funds will be captured from the customer's account. */ + capture_method?: "automatic" | "manual"; + /** 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; + confirmation_method?: "automatic" | "manual"; + /** 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; + /** + * 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; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** 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: { + accepted_at?: number; + offline?: { [key: string]: any }; + online?: { + ip_address: string; + user_agent: string; + }; + type: "offline" | "online"; }; - type: "offline" | "online"; }; - }; - /** Set of key-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]: string }; - /** 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?: Partial & Partial<"one_off" | "recurring">; - /** 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; - /** - * 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-specific configuration for this PaymentIntent. */ - payment_method_options?: { - card?: Partial<{ - installments?: { - enabled?: boolean; - plan?: Partial<{ - count: number; - interval: "month"; - type: "fixed_count"; - }> & - Partial<"">; - }; - request_three_d_secure?: "any" | "automatic"; - }> & - Partial<"">; - }; - /** 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[]; - /** Email address that the receipt for the resulting payment will be sent to. */ - receipt_email?: string; - /** 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; - /** - * 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). - */ - setup_future_usage?: "off_session" | "on_session"; - /** Shipping information for this PaymentIntent. */ - shipping?: { - address: { - city?: string; - country?: string; - line1: string; - line2?: string; - postal_code?: string; - state?: 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?: { [key: string]: string }; + /** 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?: Partial & Partial<"one_off" | "recurring">; + /** 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; + /** + * 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-specific configuration for this PaymentIntent. */ + payment_method_options?: { + card?: Partial<{ + installments?: { + enabled?: boolean; + plan?: Partial<{ + count: number; + interval: "month"; + type: "fixed_count"; + }> & + Partial<"">; + }; + request_three_d_secure?: "any" | "automatic"; + }> & + Partial<"">; }; - carrier?: string; - name: string; - phone?: string; - tracking_number?: string; - }; - /** 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; - /** 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; - /** - * 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; + /** 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[]; + /** Email address that the receipt for the resulting payment will be sent to. */ + receipt_email?: string; + /** 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; + /** + * 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). + */ + setup_future_usage?: "off_session" | "on_session"; + /** Shipping information for this PaymentIntent. */ + shipping?: { + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + }; + carrier?: string; + name: string; + phone?: string; + tracking_number?: string; + }; + /** 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; + /** 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; + /** + * 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; + }; + /** 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; + /** Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ + use_stripe_sdk?: boolean; }; - /** 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; - /** Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ - use_stripe_sdk?: boolean; }; }; }; @@ -23025,15 +23889,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["payment_intent"]; + content: { + "application/json": components["schemas"]["payment_intent"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /** @@ -23054,93 +23924,99 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["payment_intent"]; + content: { + "application/json": components["schemas"]["payment_intent"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** 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?: Partial & Partial<"">; - /** 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; - /** - * 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; - /** An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** 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-specific configuration for this PaymentIntent. */ - payment_method_options?: { - card?: Partial<{ - installments?: { - enabled?: boolean; - plan?: Partial<{ - count: number; - interval: "month"; - type: "fixed_count"; - }> & - Partial<"">; + content: { + "application/x-www-form-urlencoded": { + /** 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; + /** 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?: Partial & Partial<"">; + /** 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; + /** + * 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; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** 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-specific configuration for this PaymentIntent. */ + payment_method_options?: { + card?: Partial<{ + installments?: { + enabled?: boolean; + plan?: Partial<{ + count: number; + interval: "month"; + type: "fixed_count"; + }> & + Partial<"">; + }; + request_three_d_secure?: "any" | "automatic"; + }> & + Partial<"">; + }; + /** The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ + payment_method_types?: string[]; + /** Email address that the receipt for the resulting payment will be sent to. */ + receipt_email?: Partial & Partial<"">; + /** + * 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`. + */ + setup_future_usage?: "" | "off_session" | "on_session"; + /** Shipping information for this PaymentIntent. */ + shipping?: Partial<{ + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; }; - request_three_d_secure?: "any" | "automatic"; + carrier?: string; + name: string; + phone?: string; + tracking_number?: string; }> & Partial<"">; - }; - /** The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ - payment_method_types?: string[]; - /** Email address that the receipt for the resulting payment will be sent to. */ - receipt_email?: Partial & Partial<"">; - /** - * 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`. - */ - setup_future_usage?: "" | "off_session" | "on_session"; - /** Shipping information for this PaymentIntent. */ - shipping?: Partial<{ - address: { - city?: string; - country?: string; - line1: string; - line2?: string; - postal_code?: string; - state?: string; + /** 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; + /** 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; + /** 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; }; - carrier?: string; - name: string; - phone?: string; - tracking_number?: string; - }> & - Partial<"">; - /** 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; - /** 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; - /** 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; + /** 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 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; }; }; }; @@ -23158,23 +24034,25 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["payment_intent"]; + content: { + "application/json": components["schemas"]["payment_intent"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Reason for canceling this PaymentIntent. Possible values are `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` */ - cancellation_reason?: - | "abandoned" - | "duplicate" - | "fraudulent" - | "requested_by_customer"; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + content: { + "application/x-www-form-urlencoded": { + /** Reason for canceling this PaymentIntent. Possible values are `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` */ + cancellation_reason?: "abandoned" | "duplicate" | "fraudulent" | "requested_by_customer"; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; }; }; }; @@ -23194,35 +24072,41 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["payment_intent"]; + content: { + "application/json": components["schemas"]["payment_intent"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** - * 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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; - /** 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; - /** - * 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; + content: { + "application/x-www-form-urlencoded": { + /** 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; + /** + * 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** 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; + /** + * 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; + }; }; }; }; @@ -23263,102 +24147,108 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["payment_intent"]; + content: { + "application/json": components["schemas"]["payment_intent"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** The client secret of the PaymentIntent. */ - client_secret?: string; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** ID of the mandate to be used for this payment. */ - mandate?: string; - /** This hash contains details about the Mandate to create */ - mandate_data?: Partial<{ - customer_acceptance: { - accepted_at?: number; - offline?: { [key: string]: any }; - online?: { - ip_address: string; - user_agent: string; - }; - type: "offline" | "online"; - }; - }> & - Partial<{ + content: { + "application/x-www-form-urlencoded": { + /** The client secret of the PaymentIntent. */ + client_secret?: string; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** ID of the mandate to be used for this payment. */ + mandate?: string; + /** This hash contains details about the Mandate to create */ + mandate_data?: Partial<{ customer_acceptance: { - online: { - ip_address?: string; - user_agent?: string; + accepted_at?: number; + offline?: { [key: string]: any }; + online?: { + ip_address: string; + user_agent: string; }; - type: "online"; + type: "offline" | "online"; }; - }>; - /** 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?: Partial & Partial<"one_off" | "recurring">; - /** 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-specific configuration for this PaymentIntent. */ - payment_method_options?: { - card?: Partial<{ - installments?: { - enabled?: boolean; - plan?: Partial<{ - count: number; - interval: "month"; - type: "fixed_count"; - }> & - Partial<"">; + }> & + Partial<{ + customer_acceptance: { + online: { + ip_address?: string; + user_agent?: string; + }; + type: "online"; + }; + }>; + /** 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?: Partial & Partial<"one_off" | "recurring">; + /** 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-specific configuration for this PaymentIntent. */ + payment_method_options?: { + card?: Partial<{ + installments?: { + enabled?: boolean; + plan?: Partial<{ + count: number; + interval: "month"; + type: "fixed_count"; + }> & + Partial<"">; + }; + request_three_d_secure?: "any" | "automatic"; + }> & + Partial<"">; + }; + /** The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ + payment_method_types?: string[]; + /** Email address that the receipt for the resulting payment will be sent to. */ + receipt_email?: Partial & Partial<"">; + /** + * 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; + /** + * 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`. + */ + setup_future_usage?: "" | "off_session" | "on_session"; + /** Shipping information for this PaymentIntent. */ + shipping?: Partial<{ + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; }; - request_three_d_secure?: "any" | "automatic"; + carrier?: string; + name: string; + phone?: string; + tracking_number?: string; }> & Partial<"">; + /** Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ + use_stripe_sdk?: boolean; }; - /** The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ - payment_method_types?: string[]; - /** Email address that the receipt for the resulting payment will be sent to. */ - receipt_email?: Partial & Partial<"">; - /** - * 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; - /** - * 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`. - */ - setup_future_usage?: "" | "off_session" | "on_session"; - /** Shipping information for this PaymentIntent. */ - shipping?: Partial<{ - address: { - city?: string; - country?: string; - line1: string; - line2?: string; - postal_code?: string; - state?: string; - }; - carrier?: string; - name: string; - phone?: string; - tracking_number?: string; - }> & - Partial<"">; - /** Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ - use_stripe_sdk?: boolean; }; }; }; @@ -23377,35 +24267,35 @@ export interface operations { /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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: - | "au_becs_debit" - | "card" - | "card_present" - | "fpx" - | "ideal" - | "sepa_debit"; + type: "au_becs_debit" | "card" | "card_present" | "fpx" | "ideal" | "sepa_debit"; }; }; responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["payment_method"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["payment_method"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -23413,98 +24303,104 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["payment_method"]; + content: { + "application/json": components["schemas"]["payment_method"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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 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; + content: { + "application/x-www-form-urlencoded": { + /** 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; }; - email?: string; - name?: string; - phone?: string; - }; - /** 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?: Partial<{ - cvc?: string; - exp_month: number; - exp_year: number; - number: string; - }> & - Partial<{ - token: string; - }>; - /** The `Customer` to whom the original PaymentMethod is attached. */ - customer?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. */ - fpx?: { - 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"; - }; - /** If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. */ - ideal?: { - bank?: - | "abn_amro" - | "asn_bank" - | "bunq" - | "handelsbanken" - | "ing" - | "knab" - | "moneyou" - | "rabobank" - | "regiobank" - | "sns_bank" - | "triodos_bank" - | "van_lanschot"; - }; - /** Set of key-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]: string }; - /** The PaymentMethod to share. */ - payment_method?: string; - /** If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. */ - sepa_debit?: { - iban: string; + /** 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; + }; + /** 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?: Partial<{ + cvc?: string; + exp_month: number; + exp_year: number; + number: string; + }> & + Partial<{ + token: string; + }>; + /** The `Customer` to whom the original PaymentMethod is attached. */ + customer?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. */ + fpx?: { + 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"; + }; + /** If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. */ + ideal?: { + bank?: + | "abn_amro" + | "asn_bank" + | "bunq" + | "handelsbanken" + | "ing" + | "knab" + | "moneyou" + | "rabobank" + | "regiobank" + | "sns_bank" + | "triodos_bank" + | "van_lanschot"; + }; + /** Set of key-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]: string }; + /** The PaymentMethod to share. */ + payment_method?: string; + /** If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. */ + sepa_debit?: { + iban: string; + }; + /** 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) */ + type?: "au_becs_debit" | "card" | "fpx" | "ideal" | "sepa_debit"; }; - /** 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) */ - type?: "au_becs_debit" | "card" | "fpx" | "ideal" | "sepa_debit"; }; }; }; @@ -23522,15 +24418,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["payment_method"]; + content: { + "application/json": components["schemas"]["payment_method"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -23543,40 +24445,46 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["payment_method"]; + content: { + "application/json": components["schemas"]["payment_method"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; + content: { + "application/x-www-form-urlencoded": { + /** 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; }; - email?: string; - name?: string; - phone?: string; - }; - /** If this is a `card` PaymentMethod, this hash contains the user's card details. */ - card?: { - exp_month?: number; - exp_year?: number; + /** If this is a `card` PaymentMethod, this hash contains the user's card details. */ + card?: { + exp_month?: number; + exp_year?: number; + }; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. */ + sepa_debit?: { [key: string]: any }; }; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. */ - sepa_debit?: { [key: string]: any }; }; }; }; @@ -23602,19 +24510,25 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["payment_method"]; + content: { + "application/json": components["schemas"]["payment_method"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** The ID of the customer to which to attach the PaymentMethod. */ - customer: string; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + content: { + "application/x-www-form-urlencoded": { + /** The ID of the customer to which to attach the PaymentMethod. */ + customer: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; }; }; }; @@ -23628,17 +24542,23 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["payment_method"]; + content: { + "application/json": components["schemas"]["payment_method"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; }; }; }; @@ -23677,23 +24597,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["payout"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["payout"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /** @@ -23707,33 +24633,39 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["payout"]; + content: { + "application/json": components["schemas"]["payout"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** A positive integer in cents representing how much to payout. */ - amount: number; - /** 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; - /** An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: { [key: string]: string }; - /** 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).) */ - method?: "instant" | "standard"; - /** 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`. */ - source_type?: "bank_account" | "card" | "fpx"; - /** 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; + content: { + "application/x-www-form-urlencoded": { + /** A positive integer in cents representing how much to payout. */ + amount: number; + /** 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; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [key: string]: string }; + /** 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).) */ + method?: "instant" | "standard"; + /** 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`. */ + source_type?: "bank_account" | "card" | "fpx"; + /** 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; + }; }; }; }; @@ -23751,15 +24683,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["payout"]; + content: { + "application/json": components["schemas"]["payout"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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.

*/ @@ -23772,19 +24710,25 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["payout"]; + content: { + "application/json": components["schemas"]["payout"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + }; }; }; }; @@ -23798,17 +24742,23 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["payout"]; + content: { + "application/json": components["schemas"]["payout"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; }; }; }; @@ -23841,23 +24791,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["plan"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["plan"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -23865,67 +24821,73 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["plan"]; + content: { + "application/json": components["schemas"]["plan"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Whether the plan is currently available for new subscriptions. Defaults to `true`. */ - active?: boolean; - /** 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`. */ - aggregate_usage?: "last_during_period" | "last_ever" | "max" | "sum"; - /** A positive integer in %s (or 0 for a free plan) representing how much to charge on a recurring basis. */ - amount?: number; - /** 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; - /** 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. */ - billing_scheme?: "per_unit" | "tiered"; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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; - /** Specifies billing frequency. Either `day`, `week`, `month` or `year`. */ - interval: "day" | "month" | "week" | "year"; - /** 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; - /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; - /** A brief description of the plan, hidden from customers. */ - nickname?: string; - product?: Partial<{ + content: { + "application/x-www-form-urlencoded": { + /** Whether the plan is currently available for new subscriptions. Defaults to `true`. */ active?: boolean; + /** 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`. */ + aggregate_usage?: "last_during_period" | "last_ever" | "max" | "sum"; + /** A positive integer in %s (or 0 for a free plan) representing how much to charge on a recurring basis. */ + amount?: number; + /** 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; + /** 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. */ + billing_scheme?: "per_unit" | "tiered"; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; - metadata?: { [key: string]: string }; - name: string; - statement_descriptor?: string; - unit_label?: string; - }> & - Partial; - /** 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: Partial<"inf"> & Partial; - }[]; - /** 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. */ - tiers_mode?: "graduated" | "volume"; - /** 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; - round: "down" | "up"; + /** Specifies billing frequency. Either `day`, `week`, `month` or `year`. */ + interval: "day" | "month" | "week" | "year"; + /** 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; + /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; + /** A brief description of the plan, hidden from customers. */ + nickname?: string; + product?: Partial<{ + active?: boolean; + id?: string; + metadata?: { [key: string]: string }; + name: string; + statement_descriptor?: string; + unit_label?: string; + }> & + Partial; + /** 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: Partial<"inf"> & Partial; + }[]; + /** 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. */ + tiers_mode?: "graduated" | "volume"; + /** 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; + round: "down" | "up"; + }; + /** 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; + /** 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`. */ + usage_type?: "licensed" | "metered"; }; - /** 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; - /** 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`. */ - usage_type?: "licensed" | "metered"; }; }; }; @@ -23943,15 +24905,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["plan"]; + content: { + "application/json": components["schemas"]["plan"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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.

*/ @@ -23964,27 +24932,33 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["plan"]; + content: { + "application/json": components["schemas"]["plan"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Whether the plan is currently available for new subscriptions. */ - active?: boolean; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** A brief description of the plan, hidden from customers. */ - nickname?: string; - /** 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; - /** 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; + content: { + "application/x-www-form-urlencoded": { + /** Whether the plan is currently available for new subscriptions. */ + active?: boolean; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** A brief description of the plan, hidden from customers. */ + nickname?: string; + /** 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; + /** 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; + }; }; }; }; @@ -23998,15 +24972,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_plan"]; + content: { + "application/json": components["schemas"]["deleted_plan"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -24044,23 +25024,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["product"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["product"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Creates a new product object. To create a product for use with orders, see Products.

*/ @@ -24068,57 +25054,63 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["product"]; + content: { + "application/json": components["schemas"]["product"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Whether the product is currently available for purchase. Defaults to `true`. */ - active?: boolean; - /** A list of up to 5 alphanumeric attributes. */ - attributes?: string[]; - /** A short one-line description of the product, meant to be displayable to the customer. May only be set if type=`good`. */ - caption?: string; - /** 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[]; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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; - /** A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - images?: 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?: { [key: string]: string }; - /** 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; - /** 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; - }; - /** Whether this product is shipped (i.e., physical goods). Defaults to `true`. May only be set if type=`good`. */ - shippable?: boolean; - /** - * 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; - /** 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. */ - type?: "good" | "service"; - /** 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; - /** A URL of a publicly-accessible webpage for this product. May only be set if type=`good`. */ - url?: string; + content: { + "application/x-www-form-urlencoded": { + /** Whether the product is currently available for purchase. Defaults to `true`. */ + active?: boolean; + /** A list of up to 5 alphanumeric attributes. */ + attributes?: string[]; + /** A short one-line description of the product, meant to be displayable to the customer. May only be set if type=`good`. */ + caption?: string; + /** 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[]; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ + images?: 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?: { [key: string]: string }; + /** 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; + /** 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; + }; + /** Whether this product is shipped (i.e., physical goods). Defaults to `true`. May only be set if type=`good`. */ + shippable?: boolean; + /** + * 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; + /** 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. */ + type?: "good" | "service"; + /** 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; + /** A URL of a publicly-accessible webpage for this product. May only be set if type=`good`. */ + url?: string; + }; }; }; }; @@ -24136,15 +25128,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["product"]; + content: { + "application/json": components["schemas"]["product"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -24157,54 +25155,60 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["product"]; + content: { + "application/json": components["schemas"]["product"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Whether the product is available for purchase. */ - active?: boolean; - /** 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?: Partial & Partial<"">; - /** A short one-line description of the product, meant to be displayable to the customer. May only be set if `type=good`. */ - caption?: string; - /** 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[]; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - images?: Partial & Partial<"">; - /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; - /** 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; - /** 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?: Partial<{ - height: number; - length: number; - weight: number; - width: number; - }> & - Partial<"">; - /** Whether this product is shipped (i.e., physical goods). Defaults to `true`. May only be set if `type=good`. */ - shippable?: boolean; - /** - * 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; - /** 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; - /** A URL of a publicly-accessible webpage for this product. May only be set if `type=good`. */ - url?: string; + content: { + "application/x-www-form-urlencoded": { + /** Whether the product is available for purchase. */ + active?: boolean; + /** 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?: Partial & Partial<"">; + /** A short one-line description of the product, meant to be displayable to the customer. May only be set if `type=good`. */ + caption?: string; + /** 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[]; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ + images?: Partial & Partial<"">; + /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; + /** 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; + /** 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?: Partial<{ + height: number; + length: number; + weight: number; + width: number; + }> & + Partial<"">; + /** Whether this product is shipped (i.e., physical goods). Defaults to `true`. May only be set if `type=good`. */ + shippable?: boolean; + /** + * 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; + /** 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; + /** A URL of a publicly-accessible webpage for this product. May only be set if `type=good`. */ + url?: string; + }; }; }; }; @@ -24218,15 +25222,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_product"]; + content: { + "application/json": components["schemas"]["deleted_product"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Returns a list of early fraud warnings.

*/ @@ -24248,23 +25258,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["radar.early_fraud_warning"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["radar.early_fraud_warning"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /** @@ -24285,15 +25301,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["radar.early_fraud_warning"]; + content: { + "application/json": components["schemas"]["radar.early_fraud_warning"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -24324,23 +25346,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["radar.value_list_item"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["radar.value_list_item"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -24348,21 +25376,27 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["radar.value_list_item"]; + content: { + "application/json": components["schemas"]["radar.value_list_item"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** The value of the item (whose type must match the type of the parent value list). */ - value: string; - /** The identifier of the value list which the created item will be added to. */ - value_list: string; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The value of the item (whose type must match the type of the parent value list). */ + value: string; + /** The identifier of the value list which the created item will be added to. */ + value_list: string; + }; }; }; }; @@ -24380,15 +25414,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["radar.value_list_item"]; + content: { + "application/json": components["schemas"]["radar.value_list_item"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -24401,15 +25441,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_radar.value_list_item"]; + content: { + "application/json": components["schemas"]["deleted_radar.value_list_item"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -24440,23 +25486,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["radar.value_list"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["radar.value_list"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -24464,32 +25516,38 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["radar.value_list"]; + content: { + "application/json": components["schemas"]["radar.value_list"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** The name of the value list for use in rules. */ - alias: string; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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. */ - item_type?: - | "card_bin" - | "card_fingerprint" - | "case_sensitive_string" - | "country" - | "email" - | "ip_address" - | "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?: { [key: string]: string }; - /** The human-readable name of the value list. */ - name: string; + content: { + "application/x-www-form-urlencoded": { + /** The name of the value list for use in rules. */ + alias: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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. */ + item_type?: + | "card_bin" + | "card_fingerprint" + | "case_sensitive_string" + | "country" + | "email" + | "ip_address" + | "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?: { [key: string]: string }; + /** The human-readable name of the value list. */ + name: string; + }; }; }; }; @@ -24507,15 +25565,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["radar.value_list"]; + content: { + "application/json": components["schemas"]["radar.value_list"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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.

*/ @@ -24528,23 +25592,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["radar.value_list"]; + content: { + "application/json": components["schemas"]["radar.value_list"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** The name of the value list for use in rules. */ - alias?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: { [key: string]: string }; - /** The human-readable name of the value list. */ - name?: string; + content: { + "application/x-www-form-urlencoded": { + /** The name of the value list for use in rules. */ + alias?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [key: string]: string }; + /** The human-readable name of the value list. */ + name?: string; + }; }; }; }; @@ -24558,15 +25628,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_radar.value_list"]; + content: { + "application/json": components["schemas"]["deleted_radar.value_list"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -24596,23 +25672,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["recipient"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["recipient"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /** @@ -24623,33 +25705,39 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["recipient"]; + content: { + "application/json": components["schemas"]["recipient"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** 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; - /** An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ - description?: string; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** 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; - /** The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ - tax_id?: string; - /** Type of the recipient: either `individual` or `corporation`. */ - type: string; + content: { + "application/x-www-form-urlencoded": { + /** 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; + /** 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; + /** An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ + description?: string; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** 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; + /** The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ + tax_id?: string; + /** Type of the recipient: either `individual` or `corporation`. */ + type: string; + }; }; }; }; @@ -24667,16 +25755,22 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": Partial & - Partial; + content: { + "application/json": Partial & + Partial; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /** @@ -24695,33 +25789,39 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["recipient"]; + content: { + "application/json": components["schemas"]["recipient"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** 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; - /** ID of the card to set as the recipient's new default for payouts. */ - default_card?: string; - /** An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ - description?: string; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** 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; - /** The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ - tax_id?: string; + content: { + "application/x-www-form-urlencoded": { + /** 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; + /** 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; + /** ID of the card to set as the recipient's new default for payouts. */ + default_card?: string; + /** An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ + description?: string; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** 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; + /** The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ + tax_id?: string; + }; }; }; }; @@ -24735,15 +25835,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_recipient"]; + content: { + "application/json": components["schemas"]["deleted_recipient"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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.

*/ @@ -24774,23 +25880,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["refund"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["refund"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Create a refund.

*/ @@ -24798,25 +25910,31 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["refund"]; + content: { + "application/json": components["schemas"]["refund"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - amount?: number; - charge?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - payment_intent?: string; - reason?: "duplicate" | "fraudulent" | "requested_by_customer"; - refund_application_fee?: boolean; - reverse_transfer?: boolean; + content: { + "application/x-www-form-urlencoded": { + amount?: number; + charge?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + payment_intent?: string; + reason?: "duplicate" | "fraudulent" | "requested_by_customer"; + refund_application_fee?: boolean; + reverse_transfer?: boolean; + }; }; }; }; @@ -24834,15 +25952,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["refund"]; + content: { + "application/json": components["schemas"]["refund"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /** @@ -24859,19 +25983,25 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["refund"]; + content: { + "application/json": components["schemas"]["refund"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + }; }; }; }; @@ -24899,23 +26029,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["reporting.report_run"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["reporting.report_run"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -24923,655 +26059,661 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["reporting.report_run"]; + content: { + "application/json": components["schemas"]["reporting.report_run"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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; - 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"; - 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"; - }; - /** 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; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + 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"; + 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"; + }; + /** 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; + }; }; }; }; @@ -25589,15 +26731,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["reporting.report_run"]; + content: { + "application/json": components["schemas"]["reporting.report_run"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -25611,23 +26759,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["reporting.report_type"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["reporting.report_type"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -25644,15 +26798,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["reporting.report_type"]; + content: { + "application/json": components["schemas"]["reporting.report_type"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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.

*/ @@ -25679,23 +26839,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["review"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["review"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Retrieves a Review object.

*/ @@ -25712,15 +26878,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["review"]; + content: { + "application/json": components["schemas"]["review"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -25733,17 +26905,23 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["review"]; + content: { + "application/json": components["schemas"]["review"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; }; }; }; @@ -25776,23 +26954,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["setup_intent"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["setup_intent"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /** @@ -25805,62 +26989,68 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["setup_intent"]; + content: { + "application/json": components["schemas"]["setup_intent"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** - * 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; - /** An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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: { - accepted_at?: number; - offline?: { [key: string]: any }; - online?: { - ip_address: string; - user_agent: string; + content: { + "application/x-www-form-urlencoded": { + /** 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; + /** + * 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; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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: { + accepted_at?: number; + offline?: { [key: string]: any }; + online?: { + ip_address: string; + user_agent: string; + }; + type: "offline" | "online"; }; - type: "offline" | "online"; }; - }; - /** Set of key-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]: string }; - /** The Stripe account ID for which this SetupIntent is created. */ - on_behalf_of?: string; - /** ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - payment_method?: string; - /** Payment-method-specific configuration for this SetupIntent. */ - payment_method_options?: { - card?: { - request_three_d_secure?: "any" | "automatic"; + /** Set of key-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]: string }; + /** The Stripe account ID for which this SetupIntent is created. */ + on_behalf_of?: string; + /** ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string; + /** Payment-method-specific configuration for this SetupIntent. */ + payment_method_options?: { + card?: { + request_three_d_secure?: "any" | "automatic"; + }; }; + /** 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[]; + /** 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; + /** If this hash is populated, this SetupIntent will generate a single_use Mandate on success. */ + single_use?: { + amount: number; + currency: string; + }; + /** Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. */ + usage?: "off_session" | "on_session"; }; - /** 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[]; - /** 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; - /** If this hash is populated, this SetupIntent will generate a single_use Mandate on success. */ - single_use?: { - amount: number; - currency: string; - }; - /** Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. */ - usage?: "off_session" | "on_session"; }; }; }; @@ -25886,15 +27076,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["setup_intent"]; + content: { + "application/json": components["schemas"]["setup_intent"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Updates a SetupIntent object.

*/ @@ -25907,37 +27103,43 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["setup_intent"]; + content: { + "application/json": components["schemas"]["setup_intent"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** - * 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; - /** An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - payment_method?: string; - /** Payment-method-specific configuration for this SetupIntent. */ - payment_method_options?: { - card?: { - request_three_d_secure?: "any" | "automatic"; + content: { + "application/x-www-form-urlencoded": { + /** + * 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; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string; + /** Payment-method-specific configuration for this SetupIntent. */ + payment_method_options?: { + card?: { + request_three_d_secure?: "any" | "automatic"; + }; }; + /** 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[]; }; - /** 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[]; }; }; }; @@ -25955,22 +27157,25 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["setup_intent"]; + content: { + "application/json": components["schemas"]["setup_intent"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Reason for canceling this SetupIntent. Possible values are `abandoned`, `requested_by_customer`, or `duplicate` */ - cancellation_reason?: - | "abandoned" - | "duplicate" - | "requested_by_customer"; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + content: { + "application/x-www-form-urlencoded": { + /** Reason for canceling this SetupIntent. Possible values are `abandoned`, `requested_by_customer`, or `duplicate` */ + cancellation_reason?: "abandoned" | "duplicate" | "requested_by_customer"; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; }; }; }; @@ -25998,54 +27203,60 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["setup_intent"]; + content: { + "application/json": components["schemas"]["setup_intent"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** The client secret of the SetupIntent. */ - client_secret?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** This hash contains details about the Mandate to create */ - mandate_data?: Partial<{ - customer_acceptance: { - accepted_at?: number; - offline?: { [key: string]: any }; - online?: { - ip_address: string; - user_agent: string; - }; - type: "offline" | "online"; - }; - }> & - Partial<{ + content: { + "application/x-www-form-urlencoded": { + /** The client secret of the SetupIntent. */ + client_secret?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** This hash contains details about the Mandate to create */ + mandate_data?: Partial<{ customer_acceptance: { - online: { - ip_address?: string; - user_agent?: string; + accepted_at?: number; + offline?: { [key: string]: any }; + online?: { + ip_address: string; + user_agent: string; }; - type: "online"; + type: "offline" | "online"; + }; + }> & + Partial<{ + customer_acceptance: { + online: { + ip_address?: string; + user_agent?: string; + }; + type: "online"; + }; + }>; + /** ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string; + /** Payment-method-specific configuration for this SetupIntent. */ + payment_method_options?: { + card?: { + request_three_d_secure?: "any" | "automatic"; }; - }>; - /** ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - payment_method?: string; - /** Payment-method-specific configuration for this SetupIntent. */ - payment_method_options?: { - card?: { - request_three_d_secure?: "any" | "automatic"; }; + /** + * 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; }; - /** - * 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; }; }; }; @@ -26066,23 +27277,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["scheduled_query_run"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["scheduled_query_run"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Retrieves the details of an scheduled query run.

*/ @@ -26099,15 +27316,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["scheduled_query_run"]; + content: { + "application/json": components["schemas"]["scheduled_query_run"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -26137,23 +27360,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["sku"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["sku"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Creates a new SKU associated with a product.

*/ @@ -26161,46 +27390,52 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["sku"]; + content: { + "application/json": components["schemas"]["sku"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Whether the SKU is available for purchase. Default to `true`. */ - active?: boolean; - /** 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 }; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** The identifier for the SKU. Must be unique. If not provided, an identifier will be randomly generated. */ - id?: string; - /** The URL of an image for this SKU, meant to be displayable to the customer. */ - image?: string; - /** Description of the SKU's inventory. */ - inventory: { - quantity?: number; - type?: "bucket" | "finite" | "infinite"; - value?: "" | "in_stock" | "limited" | "out_of_stock"; - }; - /** Set of key-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]: string }; - /** The dimensions of this SKU for shipping purposes. */ - package_dimensions?: { - height: number; - length: number; - weight: number; - width: number; + content: { + "application/x-www-form-urlencoded": { + /** Whether the SKU is available for purchase. Default to `true`. */ + active?: boolean; + /** 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 }; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The identifier for the SKU. Must be unique. If not provided, an identifier will be randomly generated. */ + id?: string; + /** The URL of an image for this SKU, meant to be displayable to the customer. */ + image?: string; + /** Description of the SKU's inventory. */ + inventory: { + quantity?: number; + type?: "bucket" | "finite" | "infinite"; + value?: "" | "in_stock" | "limited" | "out_of_stock"; + }; + /** Set of key-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]: string }; + /** The dimensions of this SKU for shipping purposes. */ + package_dimensions?: { + height: number; + length: number; + weight: number; + width: number; + }; + /** 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; + /** The ID of the product this SKU is associated with. Must be a product with type `good`. */ + product: string; }; - /** 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; - /** The ID of the product this SKU is associated with. Must be a product with type `good`. */ - product: string; }; }; }; @@ -26218,16 +27453,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": Partial & - Partial; + content: { + "application/json": Partial & Partial; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /** @@ -26244,45 +27484,51 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["sku"]; + content: { + "application/json": components["schemas"]["sku"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Whether this SKU is available for purchase. */ - active?: boolean; - /** 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 }; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** The URL of an image for this SKU, meant to be displayable to the customer. */ - image?: string; - /** Description of the SKU's inventory. */ - inventory?: { - quantity?: number; - type?: "bucket" | "finite" | "infinite"; - value?: "" | "in_stock" | "limited" | "out_of_stock"; + content: { + "application/x-www-form-urlencoded": { + /** Whether this SKU is available for purchase. */ + active?: boolean; + /** 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 }; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The URL of an image for this SKU, meant to be displayable to the customer. */ + image?: string; + /** Description of the SKU's inventory. */ + inventory?: { + quantity?: number; + type?: "bucket" | "finite" | "infinite"; + value?: "" | "in_stock" | "limited" | "out_of_stock"; + }; + /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; + /** The dimensions of this SKU for shipping purposes. */ + package_dimensions?: Partial<{ + height: number; + length: number; + weight: number; + width: number; + }> & + Partial<"">; + /** 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; + /** 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; }; - /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; - /** The dimensions of this SKU for shipping purposes. */ - package_dimensions?: Partial<{ - height: number; - length: number; - weight: number; - width: number; - }> & - Partial<"">; - /** 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; - /** 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; }; }; }; @@ -26296,15 +27542,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_sku"]; + content: { + "application/json": components["schemas"]["deleted_sku"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Creates a new source object.

*/ @@ -26312,109 +27564,110 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["source"]; + content: { + "application/json": components["schemas"]["source"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** 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; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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. */ - flow?: "code_verification" | "none" | "receiver" | "redirect"; - /** Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. */ - mandate?: { - acceptance?: { - date?: number; - ip?: string; - offline?: { - contact_email: string; - }; - online?: { + content: { + "application/x-www-form-urlencoded": { + /** 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; + /** 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; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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. */ + flow?: "code_verification" | "none" | "receiver" | "redirect"; + /** Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. */ + mandate?: { + acceptance?: { date?: number; ip?: string; + offline?: { + contact_email: string; + }; + online?: { + date?: number; + ip?: string; + user_agent?: string; + }; + status: "accepted" | "pending" | "refused" | "revoked"; + type?: "offline" | "online"; user_agent?: string; }; - status: "accepted" | "pending" | "refused" | "revoked"; - type?: "offline" | "online"; - user_agent?: string; - }; - amount?: Partial & Partial<"">; - currency?: string; - interval?: "one_time" | "scheduled" | "variable"; - notification_method?: - | "deprecated_none" - | "email" - | "manual" - | "none" - | "stripe_email"; - }; - metadata?: { [key: string]: string }; - /** The source to share. */ - original_source?: string; - /** Information about the owner of the payment instrument that may be used or required by particular source types. */ - owner?: { - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - email?: string; - name?: string; - phone?: string; - }; - /** Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). */ - receiver?: { - refund_attributes_method?: "email" | "manual" | "none"; - }; - /** Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). */ - redirect?: { - return_url: string; - }; - /** 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; + amount?: Partial & Partial<"">; currency?: string; - description?: string; - parent?: string; - quantity?: number; - type?: "discount" | "shipping" | "sku" | "tax"; - }[]; - shipping?: { - address: { + interval?: "one_time" | "scheduled" | "variable"; + notification_method?: "deprecated_none" | "email" | "manual" | "none" | "stripe_email"; + }; + metadata?: { [key: string]: string }; + /** The source to share. */ + original_source?: string; + /** Information about the owner of the payment instrument that may be used or required by particular source types. */ + owner?: { + address?: { city?: string; country?: string; - line1: string; + line1?: string; line2?: string; postal_code?: string; state?: string; }; - carrier?: string; + email?: string; name?: string; phone?: string; - tracking_number?: string; }; + /** Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). */ + receiver?: { + refund_attributes_method?: "email" | "manual" | "none"; + }; + /** Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). */ + redirect?: { + return_url: string; + }; + /** 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; + type?: "discount" | "shipping" | "sku" | "tax"; + }[]; + shipping?: { + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + }; + carrier?: string; + name?: string; + phone?: string; + tracking_number?: string; + }; + }; + /** 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; + /** An optional token used to create the source. When passed, token properties will override source parameters. */ + token?: string; + /** 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; + usage?: "reusable" | "single_use"; }; - /** 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; - /** An optional token used to create the source. When passed, token properties will override source parameters. */ - token?: string; - /** 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; - usage?: "reusable" | "single_use"; }; }; }; @@ -26434,15 +27687,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["source"]; + content: { + "application/json": components["schemas"]["source"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /** @@ -26459,85 +27718,86 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["source"]; + content: { + "application/json": components["schemas"]["source"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Amount associated with the source. */ - amount?: number; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. */ - mandate?: { - acceptance?: { - date?: number; - ip?: string; - offline?: { - contact_email: string; - }; - online?: { + content: { + "application/x-www-form-urlencoded": { + /** Amount associated with the source. */ + amount?: number; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. */ + mandate?: { + acceptance?: { date?: number; ip?: string; - user_agent?: string; - }; - status: "accepted" | "pending" | "refused" | "revoked"; - type?: "offline" | "online"; - user_agent?: string; - }; - amount?: Partial & Partial<"">; - currency?: string; - interval?: "one_time" | "scheduled" | "variable"; - notification_method?: - | "deprecated_none" - | "email" - | "manual" - | "none" - | "stripe_email"; - }; - /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; - /** Information about the owner of the payment instrument that may be used or required by particular source types. */ - owner?: { - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - email?: string; - name?: string; - phone?: string; - }; - /** 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; - type?: "discount" | "shipping" | "sku" | "tax"; - }[]; - shipping?: { - address: { + offline?: { + contact_email: string; + }; + online?: { + date?: number; + ip?: string; + user_agent?: string; + }; + status: "accepted" | "pending" | "refused" | "revoked"; + type?: "offline" | "online"; + user_agent?: string; + }; + amount?: Partial & Partial<"">; + currency?: string; + interval?: "one_time" | "scheduled" | "variable"; + notification_method?: "deprecated_none" | "email" | "manual" | "none" | "stripe_email"; + }; + /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; + /** Information about the owner of the payment instrument that may be used or required by particular source types. */ + owner?: { + address?: { city?: string; country?: string; - line1: string; + line1?: string; line2?: string; postal_code?: string; state?: string; }; - carrier?: string; + email?: string; name?: string; phone?: string; - tracking_number?: string; + }; + /** 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; + type?: "discount" | "shipping" | "sku" | "tax"; + }[]; + shipping?: { + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + }; + carrier?: string; + name?: string; + phone?: string; + tracking_number?: string; + }; }; }; }; @@ -26558,15 +27818,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["source_mandate_notification"]; + content: { + "application/json": components["schemas"]["source_mandate_notification"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

List source transactions for a given source.

*/ @@ -26589,23 +27855,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["source_transaction"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["source_transaction"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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.

*/ @@ -26623,15 +27895,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["source_transaction"]; + content: { + "application/json": components["schemas"]["source_transaction"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Verify a given source.

*/ @@ -26644,19 +27922,25 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["source"]; + content: { + "application/json": components["schemas"]["source"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** The values needed to verify the source. */ - values: string[]; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The values needed to verify the source. */ + values: string[]; + }; }; }; }; @@ -26679,23 +27963,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["subscription_item"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["subscription_item"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -26703,55 +27993,58 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["subscription_item"]; + content: { + "application/json": components["schemas"]["subscription_item"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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?: Partial<{ - usage_gte: number; - }> & - Partial<"">; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: { [key: string]: string }; - /** - * 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. - */ - payment_behavior?: - | "allow_incomplete" - | "error_if_incomplete" - | "pending_if_incomplete"; - /** The identifier of the plan to add to the subscription. */ - plan?: string; - /** 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; - /** - * 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`. - */ - proration_behavior?: "always_invoice" | "create_prorations" | "none"; - /** 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; - /** The quantity you'd like to apply to the subscription item you're creating. */ - quantity?: number; - /** The identifier of the subscription to modify. */ - subscription: string; - /** 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?: Partial & Partial<"">; + content: { + "application/x-www-form-urlencoded": { + /** 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?: Partial<{ + usage_gte: number; + }> & + Partial<"">; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [key: string]: string }; + /** + * 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. + */ + payment_behavior?: "allow_incomplete" | "error_if_incomplete" | "pending_if_incomplete"; + /** The identifier of the plan to add to the subscription. */ + plan?: string; + /** 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; + /** + * 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`. + */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + /** 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; + /** The quantity you'd like to apply to the subscription item you're creating. */ + quantity?: number; + /** The identifier of the subscription to modify. */ + subscription: string; + /** 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?: Partial & Partial<"">; + }; }; }; }; @@ -26769,15 +28062,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["subscription_item"]; + content: { + "application/json": components["schemas"]["subscription_item"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -26790,55 +28089,58 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["subscription_item"]; + content: { + "application/json": components["schemas"]["subscription_item"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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?: Partial<{ - usage_gte: number; - }> & - Partial<"">; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean; - /** - * 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. - */ - payment_behavior?: - | "allow_incomplete" - | "error_if_incomplete" - | "pending_if_incomplete"; - /** The identifier of the new plan for this subscription item. */ - plan?: string; - /** 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; - /** - * 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`. - */ - proration_behavior?: "always_invoice" | "create_prorations" | "none"; - /** 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; - /** The quantity you'd like to apply to the subscription item you're creating. */ - quantity?: number; - /** 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?: Partial & Partial<"">; + content: { + "application/x-www-form-urlencoded": { + /** 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?: Partial<{ + usage_gte: number; + }> & + Partial<"">; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean; + /** + * 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. + */ + payment_behavior?: "allow_incomplete" | "error_if_incomplete" | "pending_if_incomplete"; + /** The identifier of the new plan for this subscription item. */ + plan?: string; + /** 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; + /** + * 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`. + */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + /** 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; + /** The quantity you'd like to apply to the subscription item you're creating. */ + quantity?: number; + /** 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?: Partial & Partial<"">; + }; }; }; }; @@ -26852,29 +28154,35 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_subscription_item"]; + content: { + "application/json": components["schemas"]["deleted_subscription_item"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. */ - clear_usage?: boolean; - /** 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; - /** - * 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`. - */ - proration_behavior?: "always_invoice" | "create_prorations" | "none"; - /** 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; + content: { + "application/x-www-form-urlencoded": { + /** Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. */ + clear_usage?: boolean; + /** 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; + /** + * 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`. + */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + /** 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; + }; }; }; }; @@ -26902,23 +28210,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["usage_record_summary"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["usage_record_summary"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /** @@ -26939,23 +28253,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["usage_record"]; + content: { + "application/json": components["schemas"]["usage_record"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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. */ - action?: "increment" | "set"; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** The usage quantity for the specified timestamp. */ - quantity: number; - /** 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; + content: { + "application/x-www-form-urlencoded": { + /** 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. */ + action?: "increment" | "set"; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The usage quantity for the specified timestamp. */ + quantity: number; + /** 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; + }; }; }; }; @@ -27012,23 +28332,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["subscription_schedule"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["subscription_schedule"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -27036,71 +28362,77 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["subscription_schedule"]; + content: { + "application/json": components["schemas"]["subscription_schedule"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** The identifier of the customer to create the subscription schedule for. */ - customer?: string; - /** Object representing the subscription schedule's default settings. */ - default_settings?: { - billing_thresholds?: Partial<{ - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - }> & - Partial<"">; - collection_method?: "charge_automatically" | "send_invoice"; - default_payment_method?: string; - invoice_settings?: { - days_until_due?: number; - }; - }; - /** 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. */ - end_behavior?: "cancel" | "none" | "release" | "renew"; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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; - /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; - /** 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?: Partial<{ - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - }> & - Partial<"">; - collection_method?: "charge_automatically" | "send_invoice"; - coupon?: string; - default_payment_method?: string; - default_tax_rates?: Partial & Partial<"">; - end_date?: number; - invoice_settings?: { - days_until_due?: number; + content: { + "application/x-www-form-urlencoded": { + /** The identifier of the customer to create the subscription schedule for. */ + customer?: string; + /** Object representing the subscription schedule's default settings. */ + default_settings?: { + billing_thresholds?: Partial<{ + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + }> & + Partial<"">; + collection_method?: "charge_automatically" | "send_invoice"; + default_payment_method?: string; + invoice_settings?: { + days_until_due?: number; + }; }; - iterations?: number; - plans: { + /** 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. */ + end_behavior?: "cancel" | "none" | "release" | "renew"; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; + /** 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?: Partial<{ - usage_gte: number; + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; }> & Partial<"">; - plan?: string; - quantity?: number; - tax_rates?: Partial & Partial<"">; + collection_method?: "charge_automatically" | "send_invoice"; + coupon?: string; + default_payment_method?: string; + default_tax_rates?: Partial & Partial<"">; + end_date?: number; + invoice_settings?: { + days_until_due?: number; + }; + iterations?: number; + plans: { + billing_thresholds?: Partial<{ + usage_gte: number; + }> & + Partial<"">; + plan?: string; + quantity?: number; + tax_rates?: Partial & Partial<"">; + }[]; + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + tax_percent?: number; + trial?: boolean; + trial_end?: number; }[]; - proration_behavior?: "always_invoice" | "create_prorations" | "none"; - tax_percent?: number; - trial?: boolean; - trial_end?: number; - }[]; - /** 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?: Partial & Partial<"now">; + /** 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?: Partial & Partial<"now">; + }; }; }; }; @@ -27118,15 +28450,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["subscription_schedule"]; + content: { + "application/json": components["schemas"]["subscription_schedule"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Updates an existing subscription schedule.

*/ @@ -27139,70 +28477,76 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["subscription_schedule"]; + content: { + "application/json": components["schemas"]["subscription_schedule"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Object representing the subscription schedule's default settings. */ - default_settings?: { - billing_thresholds?: Partial<{ - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - }> & - Partial<"">; - collection_method?: "charge_automatically" | "send_invoice"; - default_payment_method?: string; - invoice_settings?: { - days_until_due?: number; - }; - }; - /** 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. */ - end_behavior?: "cancel" | "none" | "release" | "renew"; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** 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?: Partial<{ - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - }> & - Partial<"">; - collection_method?: "charge_automatically" | "send_invoice"; - coupon?: string; - default_payment_method?: string; - default_tax_rates?: Partial & Partial<"">; - end_date?: Partial & Partial<"now">; - invoice_settings?: { - days_until_due?: number; + content: { + "application/x-www-form-urlencoded": { + /** Object representing the subscription schedule's default settings. */ + default_settings?: { + billing_thresholds?: Partial<{ + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + }> & + Partial<"">; + collection_method?: "charge_automatically" | "send_invoice"; + default_payment_method?: string; + invoice_settings?: { + days_until_due?: number; + }; }; - iterations?: number; - plans: { + /** 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. */ + end_behavior?: "cancel" | "none" | "release" | "renew"; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** 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?: Partial<{ - usage_gte: number; + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; }> & Partial<"">; - plan?: string; - quantity?: number; - tax_rates?: Partial & Partial<"">; + collection_method?: "charge_automatically" | "send_invoice"; + coupon?: string; + default_payment_method?: string; + default_tax_rates?: Partial & Partial<"">; + end_date?: Partial & Partial<"now">; + invoice_settings?: { + days_until_due?: number; + }; + iterations?: number; + plans: { + billing_thresholds?: Partial<{ + usage_gte: number; + }> & + Partial<"">; + plan?: string; + quantity?: number; + tax_rates?: Partial & Partial<"">; + }[]; + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + start_date?: Partial & Partial<"now">; + tax_percent?: number; + trial?: boolean; + trial_end?: Partial & Partial<"now">; }[]; + /** 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; + /** 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`. */ proration_behavior?: "always_invoice" | "create_prorations" | "none"; - start_date?: Partial & Partial<"now">; - tax_percent?: number; - trial?: boolean; - trial_end?: Partial & Partial<"now">; - }[]; - /** 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; - /** 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`. */ - proration_behavior?: "always_invoice" | "create_prorations" | "none"; + }; }; }; }; @@ -27216,21 +28560,27 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["subscription_schedule"]; + content: { + "application/json": components["schemas"]["subscription_schedule"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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; - /** If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. */ - prorate?: boolean; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. */ + prorate?: boolean; + }; }; }; }; @@ -27244,19 +28594,25 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["subscription_schedule"]; + content: { + "application/json": components["schemas"]["subscription_schedule"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** Keep any cancellation on the subscription that the schedule has set */ - preserve_cancel_date?: boolean; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Keep any cancellation on the subscription that the schedule has set */ + preserve_cancel_date?: boolean; + }; }; }; }; @@ -27315,23 +28671,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["subscription"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["subscription"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -27339,95 +28701,98 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["subscription"]; + content: { + "application/json": components["schemas"]["subscription"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** 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; - /** 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; - /** 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?: Partial<{ - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - }> & - Partial<"">; - /** 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; - /** Boolean indicating whether this subscription should cancel at the end of the current period. */ - cancel_at_period_end?: boolean; - /** 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`. */ - collection_method?: "charge_automatically" | "send_invoice"; - /** 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; - /** The identifier of the customer to subscribe. */ - customer: string; - /** 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; - /** 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; - /** 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; - /** 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?: Partial & Partial<"">; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** A list of up to 20 subscription items, each with an attached plan. */ - items?: { + content: { + "application/x-www-form-urlencoded": { + /** 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; + /** 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; + /** 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; + /** 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?: Partial<{ - usage_gte: number; + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; }> & Partial<"">; - metadata?: { [key: string]: string }; - plan?: string; - quantity?: number; - tax_rates?: Partial & Partial<"">; - }[]; - /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; - /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean; - /** - * 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. - */ - payment_behavior?: - | "allow_incomplete" - | "error_if_incomplete" - | "pending_if_incomplete"; - /** 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?: Partial<{ - interval: "day" | "month" | "week" | "year"; - interval_count?: number; - }> & - Partial<"">; - /** 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; - /** - * 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`. - */ - proration_behavior?: "always_invoice" | "create_prorations" | "none"; - /** 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?: Partial & Partial<"">; - /** 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?: Partial<"now"> & Partial; - /** 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; - /** 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; + /** 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; + /** Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean; + /** 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`. */ + collection_method?: "charge_automatically" | "send_invoice"; + /** 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; + /** The identifier of the customer to subscribe. */ + customer: string; + /** 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; + /** 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; + /** 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; + /** 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?: Partial & Partial<"">; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** A list of up to 20 subscription items, each with an attached plan. */ + items?: { + billing_thresholds?: Partial<{ + usage_gte: number; + }> & + Partial<"">; + metadata?: { [key: string]: string }; + plan?: string; + quantity?: number; + tax_rates?: Partial & Partial<"">; + }[]; + /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; + /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean; + /** + * 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. + */ + payment_behavior?: "allow_incomplete" | "error_if_incomplete" | "pending_if_incomplete"; + /** 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?: Partial<{ + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + }> & + Partial<"">; + /** 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; + /** + * 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`. + */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + /** 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?: Partial & Partial<"">; + /** 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?: Partial<"now"> & Partial; + /** 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; + /** 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; + }; }; }; }; @@ -27445,15 +28810,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["subscription"]; + content: { + "application/json": components["schemas"]["subscription"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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.

*/ @@ -27466,102 +28837,105 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["subscription"]; + content: { + "application/json": components["schemas"]["subscription"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** 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). */ - billing_cycle_anchor?: "now" | "unchanged"; - /** 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?: Partial<{ - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - }> & - Partial<"">; - /** 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?: Partial & Partial<"">; - /** Boolean indicating whether this subscription should cancel at the end of the current period. */ - cancel_at_period_end?: boolean; - /** 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`. */ - collection_method?: "charge_automatically" | "send_invoice"; - /** 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; - /** 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; - /** 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; - /** 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; - /** 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?: Partial & Partial<"">; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** List of subscription items, each with an attached plan. */ - items?: { + content: { + "application/x-www-form-urlencoded": { + /** 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; + /** 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). */ + billing_cycle_anchor?: "now" | "unchanged"; + /** 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?: Partial<{ - usage_gte: number; + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; }> & Partial<"">; - clear_usage?: boolean; - deleted?: boolean; - id?: string; + /** 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?: Partial & Partial<"">; + /** Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean; + /** 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`. */ + collection_method?: "charge_automatically" | "send_invoice"; + /** 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; + /** 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; + /** 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; + /** 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; + /** 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?: Partial & Partial<"">; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** List of subscription items, each with an attached plan. */ + items?: { + billing_thresholds?: Partial<{ + usage_gte: number; + }> & + Partial<"">; + clear_usage?: boolean; + deleted?: boolean; + id?: string; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; + plan?: string; + quantity?: number; + tax_rates?: Partial & Partial<"">; + }[]; + /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; - plan?: string; - quantity?: number; - tax_rates?: Partial & Partial<"">; - }[]; - /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; - /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean; - /** If specified, payment collection for this subscription will be paused. */ - pause_collection?: Partial<{ - behavior: "keep_as_draft" | "mark_uncollectible" | "void"; - resumes_at?: number; - }> & - Partial<"">; - /** - * 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. - */ - payment_behavior?: - | "allow_incomplete" - | "error_if_incomplete" - | "pending_if_incomplete"; - /** 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?: Partial<{ - interval: "day" | "month" | "week" | "year"; - interval_count?: number; - }> & - Partial<"">; - /** 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; - /** - * 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`. - */ - proration_behavior?: "always_invoice" | "create_prorations" | "none"; - /** 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; - /** 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?: Partial & Partial<"">; - /** 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?: Partial<"now"> & Partial; - /** 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; + /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean; + /** If specified, payment collection for this subscription will be paused. */ + pause_collection?: Partial<{ + behavior: "keep_as_draft" | "mark_uncollectible" | "void"; + resumes_at?: number; + }> & + Partial<"">; + /** + * 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. + */ + payment_behavior?: "allow_incomplete" | "error_if_incomplete" | "pending_if_incomplete"; + /** 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?: Partial<{ + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + }> & + Partial<"">; + /** 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; + /** + * 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`. + */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + /** 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; + /** 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?: Partial & Partial<"">; + /** 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?: Partial<"now"> & Partial; + /** 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; + }; }; }; }; @@ -27581,21 +28955,27 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["subscription"]; + content: { + "application/json": components["schemas"]["subscription"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ - invoice_now?: boolean; - /** Will generate a proration invoice item that credits remaining unused time until the subscription period end. */ - prorate?: boolean; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ + invoice_now?: boolean; + /** Will generate a proration invoice item that credits remaining unused time until the subscription period end. */ + prorate?: boolean; + }; }; }; }; @@ -27609,15 +28989,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_discount"]; + content: { + "application/json": components["schemas"]["deleted_discount"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -27649,23 +29035,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["tax_rate"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["tax_rate"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Creates a new tax rate.

*/ @@ -27673,31 +29065,37 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["tax_rate"]; + content: { + "application/json": components["schemas"]["tax_rate"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ - description?: string; - /** The display name of the tax rate, which will be shown to users. */ - display_name: string; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** This specifies if the tax rate is inclusive or exclusive. */ - inclusive: boolean; - /** The jurisdiction for the tax rate. */ - jurisdiction?: 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?: { [key: string]: string }; - /** This represents the tax rate percent out of 100. */ - percentage: number; + content: { + "application/x-www-form-urlencoded": { + /** 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; + /** An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + description?: string; + /** The display name of the tax rate, which will be shown to users. */ + display_name: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** This specifies if the tax rate is inclusive or exclusive. */ + inclusive: boolean; + /** The jurisdiction for the tax rate. */ + jurisdiction?: 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?: { [key: string]: string }; + /** This represents the tax rate percent out of 100. */ + percentage: number; + }; }; }; }; @@ -27715,15 +29113,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["tax_rate"]; + content: { + "application/json": components["schemas"]["tax_rate"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Updates an existing tax rate.

*/ @@ -27736,27 +29140,33 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["tax_rate"]; + content: { + "application/json": components["schemas"]["tax_rate"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ - description?: string; - /** The display name of the tax rate, which will be shown to users. */ - display_name?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** The jurisdiction for the tax rate. */ - jurisdiction?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + content: { + "application/x-www-form-urlencoded": { + /** 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; + /** An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + description?: string; + /** The display name of the tax rate, which will be shown to users. */ + display_name?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The jurisdiction for the tax rate. */ + jurisdiction?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + }; }; }; }; @@ -27765,19 +29175,25 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["terminal.connection_token"]; + content: { + "application/json": components["schemas"]["terminal.connection_token"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** 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; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + }; }; }; }; @@ -27798,23 +29214,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["terminal.location"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["terminal.location"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Creates a new Location object.

*/ @@ -27822,30 +29244,36 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["terminal.location"]; + content: { + "application/json": components["schemas"]["terminal.location"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** The full address of the location. */ - address: { - city?: string; - country: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; + content: { + "application/x-www-form-urlencoded": { + /** The full address of the location. */ + address: { + city?: string; + country: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + /** A name for the location. */ + display_name: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; }; - /** A name for the location. */ - display_name: string; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; }; }; }; @@ -27863,15 +29291,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["terminal.location"]; + content: { + "application/json": components["schemas"]["terminal.location"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -27884,30 +29318,36 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["terminal.location"]; + content: { + "application/json": components["schemas"]["terminal.location"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** The full address of the location. */ - address?: { - city?: string; - country: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; + content: { + "application/x-www-form-urlencoded": { + /** The full address of the location. */ + address?: { + city?: string; + country: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + /** A name for the location. */ + display_name?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; }; - /** A name for the location. */ - display_name?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; }; }; }; @@ -27921,15 +29361,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_terminal.location"]; + content: { + "application/json": components["schemas"]["deleted_terminal.location"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Returns a list of Reader objects.

*/ @@ -27955,24 +29401,30 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - /** A list of readers */ - data: components["schemas"]["terminal.reader"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + /** A list of readers */ + data: components["schemas"]["terminal.reader"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Creates a new Reader object.

*/ @@ -27980,25 +29432,31 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["terminal.reader"]; + content: { + "application/json": components["schemas"]["terminal.reader"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. */ - label?: string; - /** 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; - /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; - /** A code generated by the reader used for registering to an account. */ - registration_code: string; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. */ + label?: string; + /** 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; + /** Set of key-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?: Partial<{ [key: string]: string }> & Partial<"">; + /** A code generated by the reader used for registering to an account. */ + registration_code: string; + }; }; }; }; @@ -28016,15 +29474,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["terminal.reader"]; + content: { + "application/json": components["schemas"]["terminal.reader"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -28037,21 +29501,27 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["terminal.reader"]; + content: { + "application/json": components["schemas"]["terminal.reader"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** The new label of the reader. */ - label?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The new label of the reader. */ + label?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + }; }; }; }; @@ -28065,103 +29535,198 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_terminal.reader"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; - }; - }; - /** - *

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: { - "application/json": components["schemas"]["token"]; + content: { + "application/json": components["schemas"]["deleted_terminal.reader"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Information for the account this token will represent. */ - account?: { - business_type?: - | "company" - | "government_entity" - | "individual" - | "non_profit"; - company?: { - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - address_kana?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - 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; - 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?: { - document?: { - back?: string; - front?: string; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /** + *

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": { + /** Information for the account this token will represent. */ + account?: { + business_type?: "company" | "government_entity" | "individual" | "non_profit"; + company?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + 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; + 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?: { + document?: { + back?: string; + front?: string; + }; + }; + }; + individual?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + address_kanji?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + dob?: Partial<{ + day: number; + month: number; + year: number; + }> & + Partial<"">; + 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?: Partial<{ [key: string]: string }> & Partial<"">; + phone?: string; + ssn_last_4?: string; + verification?: { + additional_document?: { + back?: string; + front?: string; + }; + document?: { + back?: string; + front?: string; + }; }; }; + tos_shown_and_accepted?: boolean; }; - individual?: { + /** The bank account this token will represent. */ + bank_account?: { + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + routing_number?: string; + }; + card?: Partial<{ + 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; + }> & + Partial; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Information for the person this token will represent. */ + person?: { address?: { city?: string; country?: string; @@ -28206,6 +29771,14 @@ export interface operations { maiden_name?: string; metadata?: Partial<{ [key: string]: string }> & Partial<"">; phone?: string; + relationship?: { + director?: boolean; + executive?: boolean; + owner?: boolean; + percent_ownership?: Partial & Partial<"">; + representative?: boolean; + title?: string; + }; ssn_last_4?: string; verification?: { additional_document?: { @@ -28218,106 +29791,11 @@ export interface operations { }; }; }; - tos_shown_and_accepted?: boolean; - }; - /** The bank account this token will represent. */ - bank_account?: { - account_holder_name?: string; - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - routing_number?: string; - }; - card?: Partial<{ - 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; - }> & - Partial; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** Information for the person this token will represent. */ - person?: { - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - address_kana?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - address_kanji?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - dob?: Partial<{ - day: number; - month: number; - year: number; - }> & - Partial<"">; - 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?: Partial<{ [key: string]: string }> & Partial<"">; - phone?: string; - relationship?: { - director?: boolean; - executive?: boolean; - owner?: boolean; - percent_ownership?: Partial & Partial<"">; - representative?: boolean; - title?: string; - }; - ssn_last_4?: string; - verification?: { - additional_document?: { - back?: string; - front?: string; - }; - document?: { - back?: string; - front?: string; - }; + /** The PII this token will represent. */ + pii?: { + id_number?: string; }; }; - /** The PII this token will represent. */ - pii?: { - id_number?: string; - }; }; }; }; @@ -28335,15 +29813,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["token"]; + content: { + "application/json": components["schemas"]["token"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Returns a list of top-ups.

*/ @@ -28381,23 +29865,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["topup"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["topup"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

Top up the balance of an account

*/ @@ -28405,31 +29895,37 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["topup"]; + content: { + "application/json": components["schemas"]["topup"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** A positive integer representing how much to transfer. */ - amount: number; - /** 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; - /** An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** 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; - /** Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. */ - statement_descriptor?: string; - /** A string that identifies this top-up as part of a group. */ - transfer_group?: string; + content: { + "application/x-www-form-urlencoded": { + /** A positive integer representing how much to transfer. */ + amount: number; + /** 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; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** 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; + /** Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. */ + statement_descriptor?: string; + /** A string that identifies this top-up as part of a group. */ + transfer_group?: string; + }; }; }; }; @@ -28447,15 +29943,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["topup"]; + content: { + "application/json": components["schemas"]["topup"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -28468,21 +29970,27 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["topup"]; + content: { + "application/json": components["schemas"]["topup"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + content: { + "application/x-www-form-urlencoded": { + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + }; }; }; }; @@ -28496,17 +30004,23 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["topup"]; + content: { + "application/json": components["schemas"]["topup"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; }; }; }; @@ -28538,24 +30052,30 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - /** Details about each object. */ - data: components["schemas"]["transfer"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + /** Details about each object. */ + data: components["schemas"]["transfer"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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.

*/ @@ -28563,33 +30083,39 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["transfer"]; + content: { + "application/json": components["schemas"]["transfer"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** A positive integer in %s representing how much to transfer. */ - amount?: number; - /** 3-letter [ISO code for currency](https://stripe.com/docs/payouts). */ - currency: string; - /** An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** The ID of a connected Stripe account. See the Connect documentation for details. */ - destination: string; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: { [key: string]: string }; - /** 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; - /** The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. */ - source_type?: "bank_account" | "card" | "fpx"; - /** 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; + content: { + "application/x-www-form-urlencoded": { + /** A positive integer in %s representing how much to transfer. */ + amount?: number; + /** 3-letter [ISO code for currency](https://stripe.com/docs/payouts). */ + currency: string; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** The ID of a connected Stripe account. See the Connect documentation for details. */ + destination: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [key: string]: string }; + /** 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; + /** The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. */ + source_type?: "bank_account" | "card" | "fpx"; + /** 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; + }; }; }; }; @@ -28613,24 +30139,30 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - /** Details about each object. */ - data: components["schemas"]["transfer_reversal"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + /** Details about each object. */ + data: components["schemas"]["transfer_reversal"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /** @@ -28649,25 +30181,31 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["transfer_reversal"]; + content: { + "application/json": components["schemas"]["transfer_reversal"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** 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; - /** 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; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** 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; + content: { + "application/x-www-form-urlencoded": { + /** 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; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** 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; + }; }; }; }; @@ -28685,15 +30223,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["transfer"]; + content: { + "application/json": components["schemas"]["transfer"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /** @@ -28710,21 +30254,27 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["transfer"]; + content: { + "application/json": components["schemas"]["transfer"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + content: { + "application/x-www-form-urlencoded": { + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + }; }; }; }; @@ -28743,15 +30293,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["transfer_reversal"]; + content: { + "application/json": components["schemas"]["transfer_reversal"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /** @@ -28769,19 +30325,25 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["transfer_reversal"]; + content: { + "application/json": components["schemas"]["transfer_reversal"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + }; }; }; }; @@ -28802,23 +30364,29 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": { - data: components["schemas"]["webhook_endpoint"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; + content: { + "application/json": { + data: components["schemas"]["webhook_endpoint"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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.

*/ @@ -28826,274 +30394,280 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["webhook_endpoint"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { - /** Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version. */ - 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"; - /** Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. */ - connect?: boolean; - /** An optional description of what the wehbook is used for. */ - description?: string; - /** 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" - )[]; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** The URL of the webhook endpoint. */ - url: string; + content: { + "application/json": components["schemas"]["webhook_endpoint"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version. */ + 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"; + /** Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. */ + connect?: boolean; + /** An optional description of what the wehbook is used for. */ + description?: string; + /** 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" + )[]; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** The URL of the webhook endpoint. */ + url: string; + }; }; }; }; @@ -29111,15 +30685,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["webhook_endpoint"]; + content: { + "application/json": components["schemas"]["webhook_endpoint"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; /**

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

*/ @@ -29132,177 +30712,183 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["webhook_endpoint"]; - }; - /** Error response. */ - default: { - "application/json": components["schemas"]["error"]; - }; - }; - requestBody: { - "application/x-www-form-urlencoded": { - /** An optional description of what the wehbook is used for. */ - description?: string; - /** Disable the webhook endpoint if set to true. */ - disabled?: boolean; - /** 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" - )[]; - /** Specifies which fields in the response should be expanded. */ - expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; - /** The URL of the webhook endpoint. */ - url?: string; + content: { + "application/json": components["schemas"]["webhook_endpoint"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** An optional description of what the wehbook is used for. */ + description?: string; + /** Disable the webhook endpoint if set to true. */ + disabled?: boolean; + /** 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" + )[]; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: Partial<{ [key: string]: string }> & Partial<"">; + /** The URL of the webhook endpoint. */ + url?: string; + }; }; }; }; @@ -29316,15 +30902,21 @@ export interface operations { responses: { /** Successful response. */ 200: { - "application/json": components["schemas"]["deleted_webhook_endpoint"]; + content: { + "application/json": components["schemas"]["deleted_webhook_endpoint"]; + }; }; /** Error response. */ default: { - "application/json": components["schemas"]["error"]; + content: { + "application/json": components["schemas"]["error"]; + }; }; }; requestBody: { - "application/x-www-form-urlencoded": { [key: string]: any }; + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; }; }; } diff --git a/src/index.ts b/src/index.ts index b2c8a98a7..4a399d13e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,7 +3,7 @@ import prettier from "prettier"; import parserTypescript from "prettier/parser-typescript"; import { swaggerVersion } from "./utils"; import { transformAll } from "./transform/index"; -import { OpenAPI2, OpenAPI3, SchemaObject, SwaggerToTSOptions } from "./types"; +import { GlobalContext, OpenAPI2, OpenAPI3, SchemaObject, SwaggerToTSOptions } from "./types"; export * from "./types"; // expose all types to consumers export const WARNING_MESSAGE = `/** @@ -16,22 +16,27 @@ export const WARNING_MESSAGE = `/** export default function openapiTS( schema: OpenAPI2 | OpenAPI3 | Record, - options?: SwaggerToTSOptions + options: SwaggerToTSOptions = {} ): string { - // 1. determine version - const version = (options && options.version) || swaggerVersion(schema as OpenAPI2 | OpenAPI3); + // 1. set up context + const ctx: GlobalContext = { + auth: options.auth, + additionalProperties: options.additionalProperties || false, + formatter: typeof options.formatter === "function" ? options.formatter : undefined, + immutableTypes: options.immutableTypes || false, + rawSchema: options.rawSchema || false, + version: options.version || swaggerVersion(schema as OpenAPI2 | OpenAPI3), + } as any; // 2. generate output - let output = `${WARNING_MESSAGE} - ${transformAll(schema, { - formatter: options && typeof options.formatter === "function" ? options.formatter : undefined, - immutableTypes: (options && options.immutableTypes) || false, - rawSchema: options && options.rawSchema, - version, - })} -`; + let output = WARNING_MESSAGE; + const rootTypes = transformAll(schema, { ...ctx }); + for (const k of Object.keys(rootTypes)) { + if (typeof rootTypes[k] !== "string") continue; + output += `export interface ${k} {\n ${rootTypes[k]}\n}\n\n`; + } - // 3. Prettify output + // 3. Prettify let prettierOptions: prettier.Options = { parser: "typescript", plugins: [parserTypescript], diff --git a/src/transform/headers.ts b/src/transform/headers.ts index 086548162..3d7cb7bc3 100644 --- a/src/transform/headers.ts +++ b/src/transform/headers.ts @@ -1,15 +1,20 @@ -import { HeaderObject, SchemaFormatter } from "../types"; +import { GlobalContext, HeaderObject } from "../types"; import { comment, tsReadonly } from "../utils"; import { transformSchemaObj } from "./schema"; +interface TransformHeadersOptions extends GlobalContext { + required: Set; +} + export function transformHeaderObjMap( headerMap: Record, - options: { formatter?: SchemaFormatter; immutableTypes: boolean; version: number } + options: TransformHeadersOptions ): string { let output = ""; - Object.entries(headerMap).forEach(([k, v]) => { - if (!v.schema) return; + for (const k of Object.keys(headerMap)) { + const v = headerMap[k]; + if (!v.schema) continue; if (v.description) output += comment(v.description); @@ -17,7 +22,7 @@ export function transformHeaderObjMap( const required = v.required ? "" : "?"; output += ` ${readonly}"${k}"${required}: ${transformSchemaObj(v.schema, options)}\n`; - }); + } return output; } diff --git a/src/transform/index.ts b/src/transform/index.ts index 6b81c588b..ab3bccf56 100644 --- a/src/transform/index.ts +++ b/src/transform/index.ts @@ -1,165 +1,137 @@ -import { OperationObject, PathItemObject, SchemaFormatter } from "../types"; +import { GlobalContext, OperationObject, PathItemObject } from "../types"; import { comment, tsReadonly } from "../utils"; import { transformHeaderObjMap } from "./headers"; import { transformOperationObj } from "./operation"; import { transformPathsObj } from "./paths"; -import { transformResponsesObj, transformRequestBodies } from "./responses"; +import { transformRequestBodies } from "./request"; +import { transformResponsesObj } from "./responses"; import { transformSchemaObjMap } from "./schema"; -interface TransformOptions { - formatter?: SchemaFormatter; - immutableTypes: boolean; - rawSchema?: boolean; - version: number; -} - -export function transformAll(schema: any, { formatter, immutableTypes, rawSchema, version }: TransformOptions): string { - const readonly = tsReadonly(immutableTypes); +export function transformAll(schema: any, ctx: GlobalContext): Record { + const readonly = tsReadonly(ctx.immutableTypes); - let output = ""; + let output: Record = {}; let operations: Record = {}; // --raw-schema mode - if (rawSchema) { - switch (version) { + if (ctx.rawSchema) { + const required = new Set(Object.keys(schema)); + switch (ctx.version) { case 2: { - return `export interface definitions {\n ${transformSchemaObjMap(schema, { - formatter, - immutableTypes, - required: Object.keys(schema), - version, - })}\n}`; + output.definitions = transformSchemaObjMap(schema, { ...ctx, required }); + return output; } case 3: { - return `export interface schemas {\n ${transformSchemaObjMap(schema, { - formatter, - immutableTypes, - required: Object.keys(schema), - version, - })}\n }\n\n`; + output.schemas = transformSchemaObjMap(schema, { ...ctx, required }); + return output; } } } // #/paths (V2 & V3) - output += `export interface paths {\n`; // open paths + output.paths = ""; // open paths if (schema.paths) { - output += transformPathsObj(schema.paths, { + output.paths += transformPathsObj(schema.paths, { + ...ctx, globalParameters: (schema.components && schema.components.parameters) || schema.parameters, - immutableTypes, operations, - version, }); } - output += `}\n\n`; // close paths - switch (version) { + switch (ctx.version) { case 2: { // #/definitions if (schema.definitions) { - output += `export interface definitions {\n ${transformSchemaObjMap(schema.definitions, { - formatter, - immutableTypes, - required: Object.keys(schema.definitions), - version, - })}\n}\n\n`; + output.definitions = transformSchemaObjMap(schema.definitions, { + ...ctx, + required: new Set(Object.keys(schema.definitions)), + }); } // #/parameters if (schema.parameters) { - const required = Object.keys(schema.parameters); - output += `export interface parameters {\n ${transformSchemaObjMap(schema.parameters, { - formatter, - immutableTypes, - required, - version, - })}\n }\n\n`; + output.parameters = transformSchemaObjMap(schema.parameters, { + ...ctx, + required: new Set(Object.keys(schema.parameters)), + }); } // #/parameters if (schema.responses) { - output += `export interface responses {\n ${transformResponsesObj(schema.responses, { - formatter, - immutableTypes, - version, - })}\n }\n\n`; + output.responses = transformResponsesObj(schema.responses, ctx); } break; } case 3: { // #/components - output += `export interface components {\n`; // open components + output.components = ""; if (schema.components) { // #/components/schemas if (schema.components.schemas) { - const required = Object.keys(schema.components.schemas); - output += ` ${readonly}schemas: {\n ${transformSchemaObjMap(schema.components.schemas, { - formatter, - immutableTypes, - required, - version, + output.components += ` ${readonly}schemas: {\n ${transformSchemaObjMap(schema.components.schemas, { + ...ctx, + required: new Set(Object.keys(schema.components.schemas)), })}\n }\n`; } // #/components/responses if (schema.components.responses) { - output += ` ${readonly}responses: {\n ${transformResponsesObj(schema.components.responses, { - formatter, - immutableTypes, - version, - })}\n }\n`; + output.components += ` ${readonly}responses: {\n ${transformResponsesObj( + schema.components.responses, + ctx + )}\n }\n`; } // #/components/parameters if (schema.components.parameters) { - const required = Object.keys(schema.components.parameters); - output += ` ${readonly}parameters: {\n ${transformSchemaObjMap(schema.components.parameters, { - formatter, - immutableTypes, - required, - version, + output.components += ` ${readonly}parameters: {\n ${transformSchemaObjMap(schema.components.parameters, { + ...ctx, + required: new Set(Object.keys(schema.components.parameters)), })}\n }\n`; } // #/components/requestBodies if (schema.components.requestBodies) { - output += ` ${readonly}requestBodies: {\n ${transformRequestBodies(schema.components.requestBodies, { - formatter, - immutableTypes, - version, - })}\n }\n`; + output.components += ` ${readonly}requestBodies: {\n ${transformRequestBodies( + schema.components.requestBodies, + ctx + )}\n }\n`; } // #/components/headers if (schema.components.headers) { - output += ` ${readonly}headers: {\n ${transformHeaderObjMap(schema.components.headers, { - formatter, - immutableTypes, - version, - })} }\n`; + output.components += ` ${readonly}headers: {\n ${transformHeaderObjMap(schema.components.headers, { + ...ctx, + required: new Set(), + })}\n }\n`; } } - - output += `}\n\n`; // close components break; } } - output += `export interface operations {\n`; // open operations + // #/operations + output.operations = ""; if (Object.keys(operations).length) { - Object.entries(operations).forEach(([operationId, { operation, pathItem }]) => { - if (operation.description) output += comment(operation.description); // handle comment - output += ` ${readonly}"${operationId}": {\n ${transformOperationObj(operation, { + for (const id of Object.keys(operations)) { + const { operation, pathItem } = operations[id]; + if (operation.description) output.operations += comment(operation.description); // handle comment + output.operations += ` ${readonly}"${id}": {\n ${transformOperationObj(operation, { + ...ctx, pathItem, globalParameters: (schema.components && schema.components.parameters) || schema.parameters, - immutableTypes, - version, })}\n }\n`; - }); + } + } + + // cleanup: trim whitespace + for (const k of Object.keys(output)) { + if (typeof output[k] === "string") { + output[k] = output[k].trim(); + } } - output += `}\n`; // close operations - return output.trim(); + return output; } diff --git a/src/transform/operation.ts b/src/transform/operation.ts index ec10b1061..bb8b10136 100644 --- a/src/transform/operation.ts +++ b/src/transform/operation.ts @@ -1,41 +1,30 @@ -import { OperationObject, ParameterObject, PathItemObject, RequestBody } from "../types"; +import { GlobalContext, OperationObject, ParameterObject, PathItemObject } from "../types"; import { comment, isRef, transformRef, tsReadonly } from "../utils"; import { transformParametersArray } from "./parameters"; +import { transformRequestBodyObj } from "./request"; import { transformResponsesObj } from "./responses"; -import { transformSchemaObj } from "./schema"; -export function transformOperationObj( - operation: OperationObject, - { - globalParameters, - immutableTypes, - pathItem = {}, - version, - }: { - pathItem?: PathItemObject; - globalParameters?: Record; - immutableTypes: boolean; - version: number; - } -): string { - const readonly = tsReadonly(immutableTypes); +interface TransformOperationOptions extends GlobalContext { + globalParameters?: Record; + pathItem?: PathItemObject; +} + +export function transformOperationObj(operation: OperationObject, options: TransformOperationOptions): string { + const { pathItem = {}, globalParameters, ...ctx } = options; + const readonly = tsReadonly(ctx.immutableTypes); let output = ""; if (operation.parameters || pathItem.parameters) { const parameters = (pathItem.parameters || []).concat(operation.parameters || []); output += ` ${readonly}parameters: {\n ${transformParametersArray(parameters, { + ...ctx, globalParameters, - immutableTypes, - version, })}\n }\n`; } if (operation.responses) { - output += ` ${readonly}responses: {\n ${transformResponsesObj(operation.responses, { - immutableTypes, - version, - })}\n }\n`; + output += ` ${readonly}responses: {\n ${transformResponsesObj(operation.responses, ctx)}\n }\n`; } if (operation.requestBody) { @@ -43,36 +32,9 @@ export function transformOperationObj( output += ` ${readonly}requestBody: ${transformRef(operation.requestBody.$ref)};\n`; } else { if (operation.requestBody.description) output += comment(operation.requestBody.description); - - output += ` ${readonly}requestBody: {\n`; // open requestBody - output += ` ${transformRequestBodyObj(operation.requestBody, { immutableTypes, version })}`; - output += ` }\n`; // close requestBody + output += ` ${readonly}requestBody: {\n ${transformRequestBodyObj(operation.requestBody, ctx)} }\n`; } } return output; } - -export function transformRequestBodyObj( - requestBody: RequestBody, - { immutableTypes, version }: { immutableTypes: boolean; version: number } -): string { - const readonly = tsReadonly(immutableTypes); - - let output = ""; - - const { content } = requestBody; - - if (content && Object.keys(content).length) { - output += ` ${readonly}content: {\n`; // open content - - Object.entries(content).forEach(([k, v]) => { - output += ` ${readonly}"${k}": ${transformSchemaObj(v.schema, { immutableTypes, version })};\n`; - }); - output += ` }\n`; // close content - } else { - output += ` unknown;\n`; - } - - return output; -} diff --git a/src/transform/parameters.ts b/src/transform/parameters.ts index 19c4debef..01a9a1348 100644 --- a/src/transform/parameters.ts +++ b/src/transform/parameters.ts @@ -1,55 +1,57 @@ -import { ParameterObject, ReferenceObject } from "../types"; +import { GlobalContext, ParameterObject, ReferenceObject } from "../types"; import { comment, tsReadonly } from "../utils"; import { transformSchemaObj } from "./schema"; +interface TransformParametersOptions extends GlobalContext { + globalParameters?: Record; +} + export function transformParametersArray( parameters: (ReferenceObject | ParameterObject)[], - { - globalParameters, - immutableTypes, - version, - }: { - globalParameters?: Record; - immutableTypes: boolean; - version: number; - } + options: TransformParametersOptions ): string { - const readonly = tsReadonly(immutableTypes); + const { globalParameters = {}, ...ctx } = options; + const readonly = tsReadonly(ctx.immutableTypes); let output = ""; // sort into map let mappedParams: Record> = {}; - parameters.forEach((paramObj: any) => { + for (const paramObj of parameters as any[]) { if (paramObj.$ref && globalParameters) { const paramName = paramObj.$ref.split("/").pop(); // take last segment if (globalParameters[paramName]) { const reference = globalParameters[paramName] as any; if (!mappedParams[reference.in]) mappedParams[reference.in] = {}; - if (version === 2) { - mappedParams[reference.in][reference.name || paramName] = { - ...reference, - $ref: paramObj.$ref, - }; - } else if (version === 3) { - mappedParams[reference.in][reference.name || paramName] = { - ...reference, - schema: { $ref: paramObj.$ref }, - }; + switch (ctx.version) { + case 3: { + mappedParams[reference.in][reference.name || paramName] = { + ...reference, + schema: { $ref: paramObj.$ref }, + }; + break; + } + case 2: { + mappedParams[reference.in][reference.name || paramName] = { + ...reference, + $ref: paramObj.$ref, + }; + break; + } } } - return; + continue; } - if (!paramObj.in || !paramObj.name) return; + if (!paramObj.in || !paramObj.name) continue; if (!mappedParams[paramObj.in]) mappedParams[paramObj.in] = {}; mappedParams[paramObj.in][paramObj.name] = paramObj; - }); + } // transform output - Object.entries(mappedParams).forEach(([paramIn, paramGroup]) => { + for (const [paramIn, paramGroup] of Object.entries(mappedParams)) { output += ` ${readonly}${paramIn}: {\n`; // open in - Object.entries(paramGroup).forEach(([paramName, paramObj]) => { + for (const [paramName, paramObj] of Object.entries(paramGroup)) { let paramComment = ""; if (paramObj.deprecated) paramComment += `@deprecated `; if (paramObj.description) paramComment += paramObj.description; @@ -57,21 +59,28 @@ export function transformParametersArray( const required = paramObj.required ? `` : `?`; let paramType = ``; - if (version === 2) { - if (paramObj.in === "body" && paramObj.schema) { - paramType = transformSchemaObj(paramObj.schema, { immutableTypes, version }); - } else if (paramObj.type) { - paramType = transformSchemaObj(paramObj, { immutableTypes, version }); - } else { - paramType = "unknown"; + switch (ctx.version) { + case 3: { + paramType = paramObj.schema + ? transformSchemaObj(paramObj.schema, { ...ctx, required: new Set() }) + : "unknown"; + break; + } + case 2: { + if (paramObj.in === "body" && paramObj.schema) { + paramType = transformSchemaObj(paramObj.schema, { ...ctx, required: new Set() }); + } else if (paramObj.type) { + paramType = transformSchemaObj(paramObj, { ...ctx, required: new Set() }); + } else { + paramType = "unknown"; + } + break; } - } else if (version === 3) { - paramType = paramObj.schema ? transformSchemaObj(paramObj.schema, { immutableTypes, version }) : "unknown"; } output += ` ${readonly}"${paramName}"${required}: ${paramType};\n`; - }); + } output += ` }\n`; // close in - }); + } return output; } diff --git a/src/transform/paths.ts b/src/transform/paths.ts index 700c5bd2c..e40ab6a7e 100644 --- a/src/transform/paths.ts +++ b/src/transform/paths.ts @@ -1,68 +1,59 @@ -import { OperationObject, ParameterObject, PathItemObject } from "../types"; +import { GlobalContext, OperationObject, ParameterObject, PathItemObject } from "../types"; import { comment, transformRef, tsReadonly } from "../utils"; import { transformOperationObj } from "./operation"; import { transformParametersArray } from "./parameters"; -interface TransformPathsObjOption { +interface TransformPathsObjOption extends GlobalContext { globalParameters: Record; - immutableTypes: boolean; operations: Record; - version: number; } /** Note: this needs to mutate objects passed in */ -export function transformPathsObj( - paths: Record, - { globalParameters, immutableTypes, operations, version }: TransformPathsObjOption -): string { - const readonly = tsReadonly(immutableTypes); +export function transformPathsObj(paths: Record, options: TransformPathsObjOption): string { + const { globalParameters, operations, ...ctx } = options; + const readonly = tsReadonly(ctx.immutableTypes); let output = ""; - Object.entries(paths).forEach(([url, pathItem]) => { + for (const [url, pathItem] of Object.entries(paths)) { if (pathItem.description) output += comment(pathItem.description); // add comment if (pathItem.$ref) { output += ` ${readonly}"${url}": ${transformRef(pathItem.$ref)};\n`; - return; + continue; } output += ` ${readonly}"${url}": {\n`; // open PathItem // methods - ["get", "put", "post", "delete", "options", "head", "patch", "trace"].forEach((method) => { + for (const method of ["get", "put", "post", "delete", "options", "head", "patch", "trace"]) { const operation = (pathItem as any)[method]; - - if (!operation) return; // only allow valid methods - + if (!operation) continue; // only allow valid methods if (operation.description) output += comment(operation.description); // add comment - - // if operation has operationId, abstract into top-level operations object if (operation.operationId) { + // if operation has operationId, abstract into top-level operations object operations[operation.operationId] = { operation, pathItem }; output += ` ${readonly}"${method}": operations["${operation.operationId}"];\n`; - return; + } else { + // otherwise, inline operation + output += ` ${readonly}"${method}": {\n ${transformOperationObj(operation, { + ...ctx, + globalParameters, + pathItem, + })}\n }\n`; } - // otherwise, inline operation - output += ` ${readonly}"${method}": {\n ${transformOperationObj(operation, { - globalParameters, - immutableTypes, - pathItem, - version, - })}\n }\n`; - }); + } // parameters if (pathItem.parameters) { output += ` ${readonly}parameters: {\n ${transformParametersArray(pathItem.parameters, { + ...ctx, globalParameters, - immutableTypes, - version, })}\n }\n`; } output += ` }\n`; // close PathItem - }); + } return output; } diff --git a/src/transform/request.ts b/src/transform/request.ts new file mode 100644 index 000000000..74eb15169 --- /dev/null +++ b/src/transform/request.ts @@ -0,0 +1,34 @@ +import { GlobalContext, RequestBody } from "../types"; +import { comment, tsReadonly } from "../utils"; +import { transformSchemaObj } from "./schema"; + +export function transformRequestBodies(requestBodies: Record, ctx: GlobalContext) { + let output = ""; + + for (const name of Object.keys(requestBodies)) { + const requestBody = requestBodies[name]; + if (requestBody && requestBody.description) output += ` ${comment(requestBody.description)}`; + output += ` "${name}": {\n ${transformRequestBodyObj(requestBody, ctx)}\n }\n`; + } + + return output; +} + +export function transformRequestBodyObj(requestBody: RequestBody, ctx: GlobalContext): string { + const readonly = tsReadonly(ctx.immutableTypes); + + let output = ""; + + if (requestBody.content && Object.keys(requestBody.content).length) { + output += ` ${readonly}content: {\n`; // open content + for (const k of Object.keys(requestBody.content)) { + const v = requestBody.content[k]; + output += ` ${readonly}"${k}": ${transformSchemaObj(v.schema, { ...ctx, required: new Set() })};\n`; + } + output += ` }\n`; // close content + } else { + output += ` unknown;\n`; + } + + return output; +} diff --git a/src/transform/responses.ts b/src/transform/responses.ts index c34d1a5da..90d231254 100644 --- a/src/transform/responses.ts +++ b/src/transform/responses.ts @@ -1,36 +1,28 @@ -import { RequestBody, SchemaFormatter } from "../types"; +import { GlobalContext } from "../types"; import { comment, transformRef, tsReadonly } from "../utils"; import { transformHeaderObjMap } from "./headers"; import { transformSchemaObj } from "./schema"; -import { transformRequestBodyObj } from "./operation"; const resType = (res: string | number) => (res === 204 || (res >= 300 && res < 400) ? "never" : "unknown"); -interface Options { - formatter?: SchemaFormatter; - immutableTypes: boolean; - version: number; -} - -export function transformResponsesObj(responsesObj: Record, options: Options): string { - const { immutableTypes } = options; - const readonly = tsReadonly(immutableTypes); +export function transformResponsesObj(responsesObj: Record, ctx: GlobalContext): string { + const readonly = tsReadonly(ctx.immutableTypes); let output = ""; - Object.entries(responsesObj).forEach(([httpStatusCode, response]) => { - if (response.description) output += comment(response.description); - + for (const httpStatusCode of Object.keys(responsesObj)) { 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) { output += ` ${readonly}${statusCode}: ${transformRef(response.$ref)};\n`; // reference - return; + continue; } if ((!response.content && !response.schema) || (response.content && !Object.keys(response.content).length)) { output += ` ${readonly}${statusCode}: ${resType(statusCode)};\n`; // unknown / missing response - return; + continue; } output += ` ${readonly}${statusCode}: {\n`; // open response @@ -40,41 +32,40 @@ export function transformResponsesObj(responsesObj: Record, options if (response.headers.$ref) { output += ` ${readonly}headers: ${transformRef(response.headers.$ref)};\n`; } else { - output += ` ${readonly}headers: {\n ${transformHeaderObjMap(response.headers, options)}\n }\n`; + output += ` ${readonly}headers: {\n ${transformHeaderObjMap(response.headers, { + ...ctx, + required: new Set(), + })}\n }\n`; } } // response - if (response.content && Object.keys(response.content).length) { - // V3 - output += ` ${readonly}content: {\n`; // open content - Object.entries(response.content).forEach(([contentType, contentResponse]) => { - const responseType = - contentResponse && (contentResponse as any).schema - ? transformSchemaObj((contentResponse as any).schema, options) - : "unknown"; - output += ` ${readonly}"${contentType}": ${responseType};\n`; - }); - output += ` }\n`; //close content - } else if (response.schema) { - // V2 (note: because of the presence of "headers", we have to namespace this somehow; "schema" seemed natural) - output += ` ${readonly} schema: ${transformSchemaObj(response.schema, options)};\n`; + 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; + const responseType = + contentResponse && contentResponse?.schema + ? transformSchemaObj(contentResponse.schema, { ...ctx, required: new Set() }) + : "unknown"; + output += ` ${readonly}"${contentType}": ${responseType};\n`; + } + output += ` }\n`; // close content + break; + } + case 2: { + // note: because of the presence of "headers", we have to namespace this somehow; "schema" seemed natural + output += ` ${readonly} schema: ${transformSchemaObj(response.schema, { + ...ctx, + required: new Set(), + })};\n`; + break; + } } output += ` }\n`; // close response - }); - return output; -} - -export function transformRequestBodies(requestBodies: Record, options: Options) { - let output = ""; - - Object.entries(requestBodies).forEach(([bodyName, requestBody]) => { - if (requestBody && requestBody.description) output += ` ${comment(requestBody.description)}`; - output += ` "${bodyName}": {`; - output += ` ${transformRequestBodyObj(requestBody, options)}`; - output += ` }\n`; - }); + } return output; } diff --git a/src/transform/schema.ts b/src/transform/schema.ts index 94b813860..be79e2116 100644 --- a/src/transform/schema.ts +++ b/src/transform/schema.ts @@ -1,4 +1,4 @@ -import { SchemaFormatter } from "types"; +import { GlobalContext } from "../types"; import { comment, nodeType, @@ -6,64 +6,52 @@ import { tsArrayOf, tsIntersectionOf, tsPartial, + tsReadonly, tsTupleOf, tsUnionOf, } from "../utils"; -interface TransformSchemaObjMapOptions { - formatter?: SchemaFormatter; - immutableTypes: boolean; - required?: string[]; - version: number; +interface TransformSchemaObjOptions extends GlobalContext { + required: Set; } /** Take object keys and convert to TypeScript interface */ -export function transformSchemaObjMap(obj: Record, options: TransformSchemaObjMapOptions): string { - const readonly = options.immutableTypes ? "readonly " : ""; - let required = (options && options.required) || []; +export function transformSchemaObjMap(obj: Record, options: TransformSchemaObjOptions): string { + const readonly = tsReadonly(options.immutableTypes); let output = ""; - Object.entries(obj).forEach(([key, value]) => { + for (const k of Object.keys(obj)) { + const v = obj[k]; // 1. JSDoc comment (goes above property) - if (value.description) output += comment(value.description); + if (v.description) output += comment(v.description); // 2. name (with “?” if optional property) - output += `${readonly}"${key}"${required.includes(key) ? "" : "?"}: `; + output += `${readonly}"${k}"${options.required.has(k) ? "" : "?"}: `; // 3. transform - output += transformSchemaObj(value.schema || value, { - formatter: options.formatter, - immutableTypes: options.immutableTypes, - version: options.version, - }); + output += transformSchemaObj(v.schema || v, options); // 4. close output += `;\n`; - }); + } return output.replace(/\n+$/, "\n"); // replace repeat line endings with only one } -interface Options { - formatter?: SchemaFormatter; - immutableTypes: boolean; - version: number; -} - /** transform anyOf */ -export function transformAnyOf(anyOf: any, options: Options): string { +export function transformAnyOf(anyOf: any, options: TransformSchemaObjOptions): string { return tsIntersectionOf(anyOf.map((s: any) => tsPartial(transformSchemaObj(s, options)))); } /** transform oneOf */ -export function transformOneOf(oneOf: any, options: Options): string { +export function transformOneOf(oneOf: any, options: TransformSchemaObjOptions): string { return tsUnionOf(oneOf.map((value: any) => transformSchemaObj(value, options))); } /** Convert schema object to TypeScript */ -export function transformSchemaObj(node: any, options: Options): string { - const readonly = options.immutableTypes ? "readonly " : ""; +export function transformSchemaObj(node: any, options: TransformSchemaObjOptions): string { + const readonly = tsReadonly(options.immutableTypes); let output = ""; @@ -113,15 +101,16 @@ export function transformSchemaObj(node: any, options: Options): string { } let properties = transformSchemaObjMap(node.properties || {}, { - immutableTypes: options.immutableTypes, - required: node.required, - version: options.version, - formatter: options.formatter, + ...options, + required: new Set(node.required || []), }); // if additional properties, add an intersection with a generic map type let additionalProperties: string | undefined; - if (node.additionalProperties || (node.additionalProperties === undefined && options.version === 3)) { + if ( + node.additionalProperties || + (node.additionalProperties === undefined && options.additionalProperties && options.version === 3) + ) { if ((node.additionalProperties ?? true) === true || Object.keys(node.additionalProperties).length === 0) { additionalProperties = `{ ${readonly}[key: string]: any }`; } else if (typeof node.additionalProperties === "object") { diff --git a/src/types.ts b/src/types.ts index c84ef2b45..3bd20ecd0 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,3 +1,5 @@ +import { URL } from "url"; + export interface OpenAPI2 { swagger: string; // required paths?: Record; @@ -111,6 +113,12 @@ export interface SchemaObject { export type SchemaFormatter = (schemaObj: SchemaObject) => string | undefined; export interface SwaggerToTSOptions { + /** Allow arbitrary properties on schemas (default: false) */ + additionalProperties?: boolean; + /** (optional) Specify auth if using openapi-typescript to fetch URL */ + auth?: string; + /** (optional) Specify current working directory (cwd) to resolve remote schemas on disk (not needed for remote URL schemas) */ + cwd?: URL; /** Specify a formatter */ formatter?: SchemaFormatter; /** Generates immutable types (readonly properties and readonly array) */ @@ -122,3 +130,16 @@ export interface SwaggerToTSOptions { /** (optional) OpenAPI version. Must be present if parsing raw schema */ version?: number; } + +/** Context passed to all submodules */ +export interface GlobalContext { + additionalProperties: boolean; + auth?: string; + formatter?: SchemaFormatter; + immutableTypes: boolean; + /** (optional) Should logging be suppressed? (necessary for STDOUT) */ + silent?: boolean; + namespace?: string; + rawSchema: boolean; + version: number; +} diff --git a/tests/bin/expected/prettier-js.ts b/tests/bin/expected/prettier-js.ts index d8d2c8ee3..a7f99b44e 100644 --- a/tests/bin/expected/prettier-js.ts +++ b/tests/bin/expected/prettier-js.ts @@ -73,11 +73,11 @@ export interface components { /** Order Status */ status?: 'placed' | 'approved' | 'delivered' complete?: boolean - } & { [key: string]: any } + } Category: { id?: number name?: string - } & { [key: string]: any } + } User: { id?: number username?: string @@ -88,11 +88,11 @@ export interface components { phone?: string /** User Status */ userStatus?: number - } & { [key: string]: any } + } Tag: { id?: number name?: string - } & { [key: string]: any } + } Pet: { id?: number category?: components['schemas']['Category'] @@ -101,12 +101,12 @@ export interface components { tags?: components['schemas']['Tag'][] /** pet status in the store */ status?: 'available' | 'pending' | 'sold' - } & { [key: string]: any } + } ApiResponse: { code?: number type?: string message?: string - } & { [key: string]: any } + } } } @@ -221,7 +221,7 @@ export interface operations { name?: string /** Updated status of the pet */ status?: string - } & { [key: string]: any } + } } } } @@ -264,7 +264,7 @@ export interface operations { additionalMetadata?: string /** file to upload */ file?: string - } & { [key: string]: any } + } } } } diff --git a/tests/bin/expected/prettier-json.ts b/tests/bin/expected/prettier-json.ts index d8d2c8ee3..a7f99b44e 100644 --- a/tests/bin/expected/prettier-json.ts +++ b/tests/bin/expected/prettier-json.ts @@ -73,11 +73,11 @@ export interface components { /** Order Status */ status?: 'placed' | 'approved' | 'delivered' complete?: boolean - } & { [key: string]: any } + } Category: { id?: number name?: string - } & { [key: string]: any } + } User: { id?: number username?: string @@ -88,11 +88,11 @@ export interface components { phone?: string /** User Status */ userStatus?: number - } & { [key: string]: any } + } Tag: { id?: number name?: string - } & { [key: string]: any } + } Pet: { id?: number category?: components['schemas']['Category'] @@ -101,12 +101,12 @@ export interface components { tags?: components['schemas']['Tag'][] /** pet status in the store */ status?: 'available' | 'pending' | 'sold' - } & { [key: string]: any } + } ApiResponse: { code?: number type?: string message?: string - } & { [key: string]: any } + } } } @@ -221,7 +221,7 @@ export interface operations { name?: string /** Updated status of the pet */ status?: string - } & { [key: string]: any } + } } } } @@ -264,7 +264,7 @@ export interface operations { additionalMetadata?: string /** file to upload */ file?: string - } & { [key: string]: any } + } } } } diff --git a/tests/bin/expected/stdout.ts b/tests/bin/expected/stdout.ts index 59460406a..756d358ac 100644 --- a/tests/bin/expected/stdout.ts +++ b/tests/bin/expected/stdout.ts @@ -73,11 +73,11 @@ export interface components { /** Order Status */ status?: "placed" | "approved" | "delivered"; complete?: boolean; - } & { [key: string]: any }; + }; Category: { id?: number; name?: string; - } & { [key: string]: any }; + }; User: { id?: number; username?: string; @@ -88,11 +88,11 @@ export interface components { phone?: string; /** User Status */ userStatus?: number; - } & { [key: string]: any }; + }; Tag: { id?: number; name?: string; - } & { [key: string]: any }; + }; Pet: { id?: number; category?: components["schemas"]["Category"]; @@ -101,12 +101,12 @@ export interface components { tags?: components["schemas"]["Tag"][]; /** pet status in the store */ status?: "available" | "pending" | "sold"; - } & { [key: string]: any }; + }; ApiResponse: { code?: number; type?: string; message?: string; - } & { [key: string]: any }; + }; }; } @@ -221,7 +221,7 @@ export interface operations { name?: string; /** Updated status of the pet */ status?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -264,7 +264,7 @@ export interface operations { additionalMetadata?: string; /** file to upload */ file?: string; - } & { [key: string]: any }; + }; }; }; }; diff --git a/tests/formatter.test.ts b/tests/formatter.test.ts index bcf621db5..f7882b427 100644 --- a/tests/formatter.test.ts +++ b/tests/formatter.test.ts @@ -85,8 +85,8 @@ export interface components { calendar: { dates?: { start?: Date; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; }; } diff --git a/tests/operation.test.ts b/tests/operation.test.ts index 9296b6eeb..1eab8528f 100644 --- a/tests/operation.test.ts +++ b/tests/operation.test.ts @@ -1,25 +1,25 @@ -import prettier from "prettier"; import { transformOperationObj } from "../src/transform/operation"; -import { transformRequestBodies } from "../src/transform/responses"; + +const defaults = { additionalProperties: false, immutableTypes: false, rawSchema: false }; describe("requestBody", () => { - it("basic", () => { - const schema = { - requestBody: { - content: { - "application/json": { - schema: { $ref: "#/components/schemas/Pet" }, - }, - "application/xml": { - schema: { $ref: "#/components/schemas/Pet" }, - }, + const basicSchema = { + requestBody: { + content: { + "application/json": { + schema: { $ref: "#/components/schemas/Pet" }, + }, + "application/xml": { + schema: { $ref: "#/components/schemas/Pet" }, }, }, - }; + }, + }; + it("basic", () => { expect( - transformOperationObj(schema, { - immutableTypes: false, + transformOperationObj(basicSchema, { + ...defaults, version: 3, }).trim() ).toBe(`requestBody: { @@ -28,9 +28,12 @@ describe("requestBody", () => { "application/xml": components["schemas"]["Pet"]; } }`); + }); + it("basic (immutableTypes)", () => { expect( - transformOperationObj(schema, { + transformOperationObj(basicSchema, { + ...defaults, immutableTypes: true, version: 3, }).trim() @@ -42,20 +45,23 @@ describe("requestBody", () => { }`); }); - it("ref", () => { - const schema = { - requestBody: { $ref: "#/components/requestBodies/Request" }, - }; + const refSchema = { + requestBody: { $ref: "#/components/requestBodies/Request" }, + }; + it("$ref", () => { expect( - transformOperationObj(schema, { - immutableTypes: false, + transformOperationObj(refSchema, { + ...defaults, version: 3, }).trim() ).toBe(`requestBody: components["requestBodies"]["Request"];`); + }); + it("$ref (immutableTypes)", () => { expect( - transformOperationObj(schema, { + transformOperationObj(refSchema, { + ...defaults, immutableTypes: true, version: 3, }).trim() @@ -63,118 +69,6 @@ describe("requestBody", () => { }); }); -describe("requestBodies", () => { - const format = (source: string) => prettier.format(source, { parser: "typescript" }); - - it("basic", () => { - const schema = { - Pet: { - description: "Pet request body", - content: { - "application/json": { - schema: { - type: "object", - properties: { - test: { type: "string" }, - }, - }, - }, - }, - }, - }; - - const output = transformRequestBodies(schema, { - immutableTypes: false, - version: 2, - }).trim(); - - expect(format(`type requestBodies = {${output}}`)).toBe( - format(`type requestBodies = { - /** Pet request body */ - Pet: { - content: { - "application/json": { - test?: string; - }; - }; - }; - };`) - ); - - const outputImmutable = transformRequestBodies(schema, { - immutableTypes: true, - version: 2, - }).trim(); - - expect(format(`type requestBodies = {${outputImmutable}}`)).toBe( - format(`type requestBodies = { - /** Pet request body */ - Pet: { - readonly content: { - readonly "application/json": { - readonly test?: string; - }; - }; - }; - };`) - ); - }); - - it("hypenated", () => { - const schema = { - "Pet-example": { - description: "Pet-example request body", - content: { - "application/json": { - schema: { - type: "object", - properties: { - test: { type: "string" }, - }, - }, - }, - }, - }, - }; - - const output = transformRequestBodies(schema, { - immutableTypes: false, - version: 3, - }).trim(); - - expect(format(`type requestBodies = {${output}}`)).toBe( - format(`type requestBodies = { - /** Pet-example request body */ - "Pet-example": { - content: { - "application/json": { - test?: string; - } & { [key: string]: any }; - }; - }; - };`) - ); - - const outputImmutable = transformRequestBodies(schema, { - immutableTypes: true, - version: 3, - }).trim(); - - expect(format(`type requestBodies = {${outputImmutable}}`)).toBe( - format(`type requestBodies = { - /** Pet-example request body */ - "Pet-example": { - readonly content: { - readonly "application/json": { - readonly test?: string; - } & { readonly [key: string]: any }; - }; - }; - };`) - ); - }); -}); - describe("parameters", () => { it("operation parameters only", () => { expect( @@ -191,8 +85,8 @@ describe("parameters", () => { ], }, { + ...defaults, version: 3, - immutableTypes: false, pathItem: {}, } ).trim() @@ -209,8 +103,8 @@ describe("parameters", () => { transformOperationObj( {}, { + ...defaults, version: 3, - immutableTypes: false, pathItem: { parameters: [ { @@ -254,8 +148,8 @@ describe("parameters", () => { ], }, { + ...defaults, version: 3, - immutableTypes: false, pathItem: { parameters: [ { diff --git a/tests/parameters.test.ts b/tests/parameters.test.ts index d4db71644..9376a733f 100644 --- a/tests/parameters.test.ts +++ b/tests/parameters.test.ts @@ -1,26 +1,28 @@ import { transformParametersArray } from "../src/transform/parameters"; +const defaults = { additionalProperties: false, immutableTypes: false, rawSchema: false }; + describe("transformParametersArray()", () => { describe("v2", () => { - it("basic", () => { - const basicSchema = [ - { - description: "Specifies which fields in the response should be expanded.", - in: "query", - name: "expand", - required: false, - items: { - type: "string", - }, - type: "array", + const basicSchema: any = [ + { + description: "Specifies which fields in the response should be expanded.", + in: "query", + name: "expand", + required: false, + items: { + type: "string", }, - { in: "path", name: "three_d_secure", required: true, type: "string" }, - { in: "body", name: "payload", schema: { type: "string" } }, - ]; + type: "array", + }, + { in: "path", name: "three_d_secure", required: true, type: "string" }, + { in: "body", name: "payload", schema: { type: "string" } }, + ]; + it("basic", () => { expect( transformParametersArray(basicSchema as any, { - immutableTypes: false, + ...defaults, version: 2, }).trim() ).toBe( @@ -35,9 +37,12 @@ describe("transformParametersArray()", () => { "payload"?: string; }` ); + }); + it("basic (immutableTypes)", () => { expect( transformParametersArray(basicSchema as any, { + ...defaults, immutableTypes: true, version: 2, }).trim() @@ -55,21 +60,21 @@ describe("transformParametersArray()", () => { ); }); - it("$ref", () => { - const refSchema = [ - { $ref: "#/parameters/per_page" }, - { $ref: "#/parameters/page" }, - { $ref: "#/parameters/since" }, - ]; + const refSchema = [ + { $ref: "#/parameters/per_page" }, + { $ref: "#/parameters/page" }, + { $ref: "#/parameters/since" }, + ]; + it("$ref", () => { expect( transformParametersArray(refSchema, { + ...defaults, 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" }, }, - immutableTypes: false, version: 2, }).trim() ).toBe(`query: { @@ -77,15 +82,18 @@ describe("transformParametersArray()", () => { "page"?: parameters["page"]; "since"?: parameters["since"]; }`); + }); + it("$ref (immutableTypes)", () => { expect( transformParametersArray(refSchema, { + ...defaults, + immutableTypes: 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" }, }, - immutableTypes: true, version: 2, }).trim() ).toBe(`readonly query: { @@ -97,33 +105,33 @@ describe("transformParametersArray()", () => { }); describe("v3", () => { - it("basic", () => { - const basicSchema = [ - { - description: "Specifies which fields in the response should be expanded.", - in: "query", - name: "expand", - required: false, - schema: { - items: { - type: "string", - }, - type: "array", - }, - }, - { - in: "path", - name: "three_d_secure", - required: true, - schema: { + const basicSchema = [ + { + description: "Specifies which fields in the response should be expanded.", + in: "query", + name: "expand", + required: false, + schema: { + items: { type: "string", }, + type: "array", }, - ]; + }, + { + in: "path", + name: "three_d_secure", + required: true, + schema: { + type: "string", + }, + }, + ]; + it("basic", () => { expect( transformParametersArray(basicSchema as any, { - immutableTypes: false, + ...defaults, version: 3, }).trim() ).toBe( @@ -135,9 +143,12 @@ describe("transformParametersArray()", () => { "three_d_secure": string; }` ); + }); + it("basic (immutableTypes)", () => { expect( transformParametersArray(basicSchema as any, { + ...defaults, immutableTypes: true, version: 3, }).trim() @@ -152,21 +163,21 @@ describe("transformParametersArray()", () => { ); }); - it("$ref", () => { - const refSchema = [ - { $ref: "#/components/parameters/per_page" }, - { $ref: "#/components/parameters/page" }, - { $ref: "#/components/parameters/since" }, - ]; + const refSchema = [ + { $ref: "#/components/parameters/per_page" }, + { $ref: "#/components/parameters/page" }, + { $ref: "#/components/parameters/since" }, + ]; + it("$ref", () => { expect( transformParametersArray(refSchema, { + ...defaults, globalParameters: { per_page: { in: "query", name: "per_page", required: true }, page: { in: "query", name: "page" }, since: { in: "query", name: "since" }, }, - immutableTypes: false, version: 3, }).trim() ).toBe(`query: { @@ -174,15 +185,18 @@ describe("transformParametersArray()", () => { "page"?: components["parameters"]["page"]; "since"?: components["parameters"]["since"]; }`); + }); + it("$ref (immutableTypes)", () => { expect( transformParametersArray(refSchema, { + ...defaults, + immutableTypes: true, globalParameters: { per_page: { in: "query", name: "per_page", required: true }, page: { in: "query", name: "page" }, since: { in: "query", name: "since" }, }, - immutableTypes: true, version: 3, }).trim() ).toBe(`readonly query: { @@ -200,7 +214,7 @@ describe("transformParametersArray()", () => { expect( transformParametersArray(schema as any, { - immutableTypes: false, + ...defaults, version: 3, }).trim() ).toBe(`query: { diff --git a/tests/paths.test.ts b/tests/paths.test.ts index 7e17acefb..d04d7a4ef 100644 --- a/tests/paths.test.ts +++ b/tests/paths.test.ts @@ -1,78 +1,76 @@ import prettier from "prettier"; -import { transformPathsObj } from "../src/transform/paths"; +import { transformPathsObj as transform } from "../src/transform/paths"; -const transform = (schema: any, operations: any = { operations: {}, globalParameters: {} }, globalParameters?: any) => - prettier.format( - `export interface paths {\n${transformPathsObj(schema, { - globalParameters, - immutableTypes: operations.immutableTypes, - operations, - version: 3, - })}\n}`.trim(), - { - parser: "typescript", - } - ); +function format(source: string): string { + return prettier.format(`export interface paths {\n${source}\n}`, { parser: "typescript" }); +} + +const defaults = { + additionalProperties: false, + globalParameters: {}, + immutableTypes: false, + operations: {}, + rawSchema: false, + version: 3, // both 2 and 3 should generate the same +}; describe("transformPathsObj", () => { - it("basic", () => { - const basicSchema = { - "/": { - get: { - responses: { - 200: { - content: { - "application/json": { - schema: { - type: "object", - properties: { title: { type: "string" }, body: { type: "string" } }, - additionalProperties: false, - required: ["title", "body"], - }, + const basicSchema: any = { + "/": { + get: { + responses: { + 200: { + content: { + "application/json": { + schema: { + type: "object", + properties: { title: { type: "string" }, body: { type: "string" } }, + additionalProperties: false, + required: ["title", "body"], }, }, }, }, }, }, - "/search": { - post: { - parameters: [ - { name: "q", in: "query", required: true, schema: { type: "string" } }, - { name: "p", in: "query", schema: { type: "integer" } }, - ], - responses: { - 200: { - content: { - "application/json": { - schema: { - type: "object", - properties: { - results: { - type: "array", - items: { $ref: "#/components/schemas/SearchResult" }, - }, - total: { type: "integer" }, - }, - additionalProperties: false, - required: ["total"], + }, + "/search": { + post: { + parameters: [ + { name: "q", in: "query", required: true, schema: { type: "string" } }, + { name: "p", in: "query", schema: { type: "integer" } }, + ], + responses: { + 200: { + content: { + "application/json": { + schema: { + type: "object", + properties: { + results: { type: "array", items: { $ref: "#/components/schemas/SearchResult" } }, + total: { type: "integer" }, }, + additionalProperties: false, + required: ["total"], }, }, }, - 404: { - content: { - "application/json": { - schema: { $ref: "#/components/schemas/ErrorResponse" }, - }, + }, + 404: { + content: { + "application/json": { + schema: { $ref: "#/components/schemas/ErrorResponse" }, }, }, }, }, }, - }; + }, + }; - expect(transform(basicSchema)).toBe(`export interface paths { + it("basic", () => { + expect(format(transform(basicSchema, { ...defaults }))).toBe( + format(` "/": { get: { responses: { @@ -111,10 +109,13 @@ describe("transformPathsObj", () => { }; }; }; - }; -}\n`); + };`) + ); + }); - expect(transform(basicSchema, { immutableTypes: true })).toBe(`export interface paths { + it("basic (immutableTypes)", () => { + expect(format(transform(basicSchema, { ...defaults, immutableTypes: true }))).toBe( + format(` readonly "/": { readonly get: { readonly responses: { @@ -153,48 +154,26 @@ describe("transformPathsObj", () => { }; }; }; - }; -}\n`); + };`) + ); }); - it("empty responses (#333, #536)", () => { - const emptyResponsesSchema = { - "/no-content": { - get: { - responses: { - 200: { - description: "OK", - content: { - "application/json": {}, - }, - }, - 204: { - description: "Empty response", - }, - }, + const emptyResponsesSchema: any = { + "/no-content": { + get: { + responses: { + 200: { description: "OK", content: { "application/json": {} } }, + 204: { description: "Empty response" }, }, }, - "/not-modified": { - get: { - responses: { - 304: { - description: "Empty response", - }, - }, - }, - }, - "/not-found": { - get: { - responses: { - 404: { - description: "Empty response", - }, - }, - }, - }, - }; + }, + "/not-modified": { get: { responses: { 304: { description: "Empty response" } } } }, + "/not-found": { get: { responses: { 404: { description: "Empty response" } } } }, + }; - expect(transform(emptyResponsesSchema)).toBe(`export interface paths { + it("empty responses (#333, #536)", () => { + expect(format(transform(emptyResponsesSchema, { ...defaults, version: 3 }))).toBe( + format(` "/no-content": { get: { responses: { @@ -224,10 +203,13 @@ describe("transformPathsObj", () => { 404: unknown; }; }; - }; -}\n`); + };`) + ); + }); - expect(transform(emptyResponsesSchema, { immutableTypes: true })).toBe(`export interface paths { + it("empty responses (immutableTypes)", () => { + expect(format(transform(emptyResponsesSchema, { ...defaults, immutableTypes: true }))).toBe( + format(` readonly "/no-content": { readonly get: { readonly responses: { @@ -257,54 +239,50 @@ describe("transformPathsObj", () => { readonly 404: unknown; }; }; - }; -}\n`); + };`) + ); }); - it("requestBody (#338)", () => { - const requestBodySchema = { - "/tests": { - post: { - requestBody: { + const requestBodySchema: any = { + "/tests": { + post: { + requestBody: { + content: { + "application/json": { + schema: { + type: "object", + properties: { title: { type: "string" } }, + additionalProperties: false, + required: ["title"], + }, + }, + }, + }, + responses: { + 201: { content: { "application/json": { schema: { type: "object", - properties: { - title: { type: "string" }, - }, + properties: { id: { type: "string" }, title: { type: "string" } }, additionalProperties: false, - required: ["title"], + required: ["title", "id"], }, }, }, }, - responses: { - 201: { - content: { - "application/json": { - schema: { - type: "object", - properties: { - id: { type: "string" }, - title: { type: "string" }, - }, - additionalProperties: false, - required: ["title", "id"], - }, - }, - }, - }, - }, - }, - delete: { - operationId: "testsDelete", - requestBody: { $ref: "#/components/schemas/Pet" }, }, }, - }; + delete: { + operationId: "testsDelete", + requestBody: { $ref: "#/components/schemas/Pet" }, + }, + }, + }; - expect(transform(requestBodySchema)).toBe(`export interface paths { + it("requestBody (#338)", () => { + expect(format(transform(requestBodySchema, { ...defaults }))).toBe( + format(` "/tests": { post: { responses: { @@ -326,10 +304,13 @@ describe("transformPathsObj", () => { }; }; delete: operations["testsDelete"]; - }; -}\n`); + };`) + ); + }); - expect(transform(requestBodySchema, { immutableTypes: true })).toBe(`export interface paths { + it("requestBody (immutableTypes)", () => { + expect(format(transform(requestBodySchema, { ...defaults, immutableTypes: true }))).toBe( + format(` readonly "/tests": { readonly post: { readonly responses: { @@ -351,43 +332,44 @@ describe("transformPathsObj", () => { }; }; readonly delete: operations["testsDelete"]; - }; -}\n`); + };`) + ); }); it("$refs in paths (#329, #351, #408)", () => { - const refsSchema = { - "/some/path": { - get: { - parameters: [{ $ref: "#/components/parameters/param1" }, { $ref: "#/components/parameters/param2" }], - responses: { - 400: { $ref: "#/components/responses/400BadRequest" }, - }, - }, - }, - }; - expect( - transform( - refsSchema, - {}, - { - param1: { - name: "param1", - description: "some description", - in: "query", - required: true, - schema: { type: "string" }, - }, - param2: { - name: "param2", - in: "query", - required: false, - schema: { type: "string" }, + format( + transform( + { + "/some/path": { + get: { + parameters: [{ $ref: "#/components/parameters/param1" }, { $ref: "#/components/parameters/param2" }], + responses: { 400: { $ref: "#/components/responses/400BadRequest" } }, + }, + }, }, - } + { + ...defaults, + globalParameters: { + param1: { + name: "param1", + description: "some description", + in: "query", + required: true, + schema: { type: "string" }, + }, + param2: { + name: "param2", + in: "query", + required: false, + schema: { type: "string" }, + }, + }, + } + ) ) - ).toBe(`export interface paths { + ).toBe( + format(` "/some/path": { get: { parameters: { @@ -401,67 +383,25 @@ describe("transformPathsObj", () => { 400: components["responses"]["400BadRequest"]; }; }; - }; -}\n`); - - expect( - transform( - refsSchema, - { immutableTypes: true }, - { - param1: { - name: "param1", - description: "some description", - in: "query", - required: true, - schema: { type: "string" }, - }, - param2: { - name: "param2", - in: "query", - required: false, - schema: { type: "string" }, - }, - } - ) - ).toBe(`export interface paths { - readonly "/some/path": { - readonly get: { - readonly parameters: { - readonly query: { - /** some description */ - readonly param1: components["parameters"]["param1"]; - readonly param2?: components["parameters"]["param2"]; - }; - }; - readonly responses: { - readonly 400: components["responses"]["400BadRequest"]; - }; - }; - }; -}\n`); + };`) + ); }); it("parameters on entire path (#346)", () => { - const parametersSchema = { - "/{example}": { - get: { - responses: {}, - }, - parameters: [ + expect( + format( + transform( { - name: "example", - in: "path", - required: true, - schema: { - type: "string", + "/{example}": { + get: { responses: {} }, + parameters: [{ name: "example", in: "path", required: true, schema: { type: "string" } }], }, }, - ], - }, - }; - - expect(transform(parametersSchema)).toBe(`export interface paths { + { ...defaults } + ) + ) + ).toBe( + format(` "/{example}": { get: { parameters: { @@ -476,47 +416,29 @@ describe("transformPathsObj", () => { example: string; }; }; - }; -}\n`); - - expect(transform(parametersSchema, { immutableTypes: true })).toBe(`export interface paths { - readonly "/{example}": { - readonly get: { - readonly parameters: { - readonly path: { - readonly example: string; - }; - }; - readonly responses: {}; - }; - readonly parameters: { - readonly path: { - readonly example: string; - }; - }; - }; -}\n`); + };`) + ); }); it("parameters missing schema (#377)", () => { - const parametersMissingSchema = { - "/c/{id}.json": { - get: { - description: "Get a list of topics in the specified category\n", - tags: ["Categories"], - parameters: [ - { - name: "id", - in: "path", - required: true, + expect( + format( + transform( + { + "/c/{id}.json": { + get: { + description: "Get a list of topics in the specified category\n", + tags: ["Categories"], + parameters: [{ name: "id", in: "path", required: true }], + responses: {}, + }, }, - ], - responses: {}, - }, - }, - }; - - expect(transform(parametersMissingSchema)).toBe(`export interface paths { + }, + { ...defaults } + ) + ) + ).toBe( + format(` "/c/{id}.json": { /** Get a list of topics in the specified category */ get: { @@ -527,55 +449,37 @@ describe("transformPathsObj", () => { }; responses: {}; }; - }; -}\n`); - - expect(transform(parametersMissingSchema, { immutableTypes: true })).toBe(`export interface paths { - readonly "/c/{id}.json": { - /** Get a list of topics in the specified category */ - readonly get: { - readonly parameters: { - readonly path: { - readonly id: unknown; - }; - }; - readonly responses: {}; - }; - }; -}\n`); + };`) + ); }); it("paths include 'summary' and 'description'", () => { - const pathsIncludeSchema = { - "/": { - summary: "root summary", - description: "root description", - get: { - summary: "get summary", - description: "get description", - responses: {}, - }, - }, - }; - - expect(transform(pathsIncludeSchema)).toBe(`export interface paths { + expect( + format( + transform( + { + "/": { + summary: "root summary", + description: "root description", + get: { + summary: "get summary", + description: "get description", + responses: {}, + }, + }, + }, + { ...defaults } + ) + ) + ).toBe( + format(` /** root description */ "/": { /** get description */ get: { responses: {}; }; - }; -}\n`); - - expect(transform(pathsIncludeSchema, { immutableTypes: true })).toBe(`export interface paths { - /** root description */ - readonly "/": { - /** get description */ - readonly get: { - readonly responses: {}; - }; - }; -}\n`); + };`) + ); }); }); diff --git a/tests/raw-schema.test.ts b/tests/raw-schema.test.ts index 5fdee37b2..0f4c19db8 100644 --- a/tests/raw-schema.test.ts +++ b/tests/raw-schema.test.ts @@ -31,26 +31,6 @@ export interface definitions { email: string; }; }\n`); - - expect( - openapiTS(v2schema, { - immutableTypes: true, - rawSchema: true, - version: 2, - }) - ).toBe(`/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface definitions { - readonly User: { - /** user name */ - readonly name: string; - /** user email */ - readonly email: string; - }; -}\n`); }); it("v3", () => { @@ -84,25 +64,5 @@ export interface schemas { email: string; }; }\n`); - - expect( - openapiTS(v3schema, { - immutableTypes: true, - rawSchema: true, - version: 3, - }) - ).toBe(`/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface schemas { - readonly User: { - /** user name */ - readonly name: string; - /** user email */ - readonly email: string; - }; -}\n`); }); }); diff --git a/tests/request.test.ts b/tests/request.test.ts new file mode 100644 index 000000000..77cd860cb --- /dev/null +++ b/tests/request.test.ts @@ -0,0 +1,105 @@ +import prettier from "prettier"; +import { transformRequestBodies } from "../src/transform/request"; + +const defaults = { additionalProperties: false, immutableTypes: false, rawSchema: false }; + +function format(source: string) { + return prettier.format(`type requestBodies = {${source.trim()}}`, { parser: "typescript" }); +} + +describe("requestBodies", () => { + const basicSchema = { + Pet: { + description: "Pet request body", + content: { + "application/json": { + schema: { + type: "object", + properties: { + test: { type: "string" }, + }, + }, + }, + }, + }, + }; + + it("basic", () => { + expect(format(transformRequestBodies(basicSchema, { ...defaults, version: 2 }))).toBe( + format(`/** Pet request body */ + Pet: { + content: { + "application/json": { + test?: string; + }; + }; + };`) + ); + }); + + it("basic (immutableTypes)", () => { + expect(format(transformRequestBodies(basicSchema, { ...defaults, immutableTypes: true, version: 2 }))).toBe( + format(`/** Pet request body */ + Pet: { + readonly content: { + readonly "application/json": { + readonly test?: string; + }; + }; + };`) + ); + }); + + const schemaHyphen = { + "Pet-example": { + description: "Pet-example request body", + content: { + "application/json": { + schema: { + type: "object", + properties: { test: { type: "string" } }, + }, + }, + }, + }, + }; + + it("hypenated", () => { + expect(format(transformRequestBodies(schemaHyphen, { ...defaults, version: 3 }))).toBe( + format(`/** Pet-example request body */ + "Pet-example": { + content: { + "application/json": { + test?: string; + } + }; + };`) + ); + }); + + it("hypenated (additionalProperties)", () => { + expect(format(transformRequestBodies(schemaHyphen, { ...defaults, additionalProperties: true, version: 3 }))).toBe( + format(`/** Pet-example request body */ + "Pet-example": { + content: { + "application/json": { + test?: string; + } & { [key: string]: any }; + }; + };`) + ); + }); + + it("hyphenated (immutable)", () => { + expect(format(transformRequestBodies(schemaHyphen, { ...defaults, immutableTypes: true, version: 3 }))).toBe( + format(`/** Pet-example request body */ + "Pet-example": { + readonly content: { + readonly "application/json": { + readonly test?: string; + } + }; + };`) + ); + }); +}); diff --git a/tests/schema.test.ts b/tests/schema.test.ts index a9231dc9f..94948b351 100644 --- a/tests/schema.test.ts +++ b/tests/schema.test.ts @@ -2,217 +2,200 @@ * Tests raw generation, pre-Prettier */ -import { transformSchemaObj } from "../src/transform/schema"; +import { transformSchemaObj as transform } from "../src/transform/schema"; -function transform(schemaObject: any, immutableTypes = false, version = 2): string { - return transformSchemaObj(schemaObject, { immutableTypes, version }).trim(); -} +const defaults = { + additionalProperties: false, + immutableTypes: false, + required: new Set(), + rawSchema: false, + version: 3, +}; describe("SchemaObject", () => { describe("basic", () => { it("string", () => { - expect(transform({ type: "string" })).toBe("string"); - expect(transform({ type: "string", nullable: true })).toBe("(string) | null"); + expect(transform({ type: "string" }, { ...defaults })).toBe("string"); + expect(transform({ type: "string", nullable: true }, { ...defaults })).toBe("(string) | null"); }); it("number", () => { - expect(transform({ type: "integer" })).toBe("number"); - expect(transform({ type: "number" })).toBe("number"); - expect(transform({ type: "number", nullable: true })).toBe("(number) | null"); + expect(transform({ type: "integer" }, { ...defaults })).toBe("number"); + expect(transform({ type: "number" }, { ...defaults })).toBe("number"); + expect(transform({ type: "number", nullable: true }, { ...defaults })).toBe("(number) | null"); }); it("boolean", () => { - expect(transform({ type: "boolean" })).toBe("boolean"); - expect(transform({ type: "boolean", nullable: true })).toBe("(boolean) | null"); + expect(transform({ type: "boolean" }, { ...defaults })).toBe("boolean"); + expect(transform({ type: "boolean", nullable: true }, { ...defaults })).toBe("(boolean) | null"); }); - it("object", () => { - // standard object - expect( - transform({ + const objStd = { + type: "object", + properties: { + object: { + properties: { string: { type: "string" }, number: { $ref: "#/components/schemas/object_ref" } }, type: "object", - properties: { - object: { - properties: { string: { type: "string" }, number: { $ref: "#/components/schemas/object_ref" } }, - type: "object", - }, - }, - }) - ).toBe(`{\n"object"?: {\n"string"?: string;\n"number"?: components["schemas"]["object_ref"];\n\n};\n\n}`); + }, + }, + }; + const objUnknown = { type: "object" }; + const objNullable = { type: "object", properties: { string: { type: "string" } }, nullable: true }; + const objRequired = { + properties: { required: { type: "string" }, optional: { type: "boolean" } }, + required: ["required"], + type: "object", + }; - expect( - transform( - { - type: "object", - properties: { - object: { - properties: { string: { type: "string" }, number: { $ref: "#/components/schemas/object_ref" } }, - type: "object", - }, - }, - }, - true - ) - ).toBe( - `{\nreadonly "object"?: {\nreadonly "string"?: string;\nreadonly "number"?: components["schemas"]["object_ref"];\n\n};\n\n}` + it("object", () => { + // standard object + expect(transform(objStd, { ...defaults })).toBe( + `{\n"object"?: {\n"string"?: string;\n"number"?: components["schemas"]["object_ref"];\n\n};\n\n}` ); // unknown - expect(transform({ type: "object" })).toBe(`{ [key: string]: any }`); - - expect(transform({ type: "object" }, true)).toBe(`{ readonly [key: string]: any }`); + expect(transform(objUnknown, { ...defaults })).toBe(`{ [key: string]: any }`); // empty - expect(transform({})).toBe(`{ [key: string]: any }`); - - expect(transform({}, true)).toBe(`{ readonly [key: string]: any }`); + expect(transform({}, { ...defaults })).toBe(`{ [key: string]: any }`); // nullable - expect(transform({ type: "object", properties: { string: { type: "string" } }, nullable: true })).toBe( - `({\n"string"?: string;\n\n}) | null` - ); - - expect(transform({ type: "object", properties: { string: { type: "string" } }, nullable: true }, true)).toBe( - `({\nreadonly "string"?: string;\n\n}) | null` - ); + expect(transform(objNullable, { ...defaults })).toBe(`({\n"string"?: string;\n\n}) | null`); // required - expect( - transform({ - properties: { required: { type: "string" }, optional: { type: "boolean" } }, - required: ["required"], - type: "object", - }) - ).toBe(`{\n"required": string;\n"optional"?: boolean;\n\n}`); + expect(transform(objRequired, { ...defaults })).toBe(`{\n"required": string;\n"optional"?: boolean;\n\n}`); + }); - expect( - transform( - { - properties: { required: { type: "string" }, optional: { type: "boolean" } }, - required: ["required"], - type: "object", - }, - true - ) - ).toBe(`{\nreadonly "required": string;\nreadonly "optional"?: boolean;\n\n}`); + it("object (immutableTypes)", () => { + // (same as above test, but with immutableTypes: true) + const opts = { ...defaults, immutableTypes: true }; + expect(transform(objStd, opts)).toBe( + `{\nreadonly "object"?: {\nreadonly "string"?: string;\nreadonly "number"?: components["schemas"]["object_ref"];\n\n};\n\n}` + ); + expect(transform(objUnknown, opts)).toBe(`{ readonly [key: string]: any }`); + expect(transform({}, opts)).toBe(`{ readonly [key: string]: any }`); + expect(transform(objNullable, opts)).toBe(`({\nreadonly "string"?: string;\n\n}) | null`); + expect(transform(objRequired, opts)).toBe(`{\nreadonly "required": string;\nreadonly "optional"?: boolean;\n\n}`); }); it("array", () => { // primitive - expect(transform({ type: "array", items: { type: "string" } })).toBe(`(string)[]`); - expect(transform({ type: "array", items: { type: "number" } })).toBe(`(number)[]`); - expect(transform({ type: "array", items: { type: "boolean" } })).toBe(`(boolean)[]`); - - expect(transform({ type: "array", items: { type: "string" } }, true)).toBe(`readonly (string)[]`); - expect(transform({ type: "array", items: { type: "number" } }, true)).toBe(`readonly (number)[]`); - expect(transform({ type: "array", items: { type: "boolean" } }, true)).toBe(`readonly (boolean)[]`); + expect(transform({ type: "array", items: { type: "string" } }, { ...defaults })).toBe(`(string)[]`); + expect(transform({ type: "array", items: { type: "number" } }, { ...defaults })).toBe(`(number)[]`); + expect(transform({ type: "array", items: { type: "boolean" } }, { ...defaults })).toBe(`(boolean)[]`); // nested - expect( - transform({ type: "array", items: { type: "array", items: { type: "array", items: { type: "number" } } } }) - ).toBe(`(((number)[])[])[]`); - expect( transform( { type: "array", items: { type: "array", items: { type: "array", items: { type: "number" } } } }, - true + { ...defaults } ) - ).toBe(`readonly (readonly (readonly (number)[])[])[]`); + ).toBe(`(((number)[])[])[]`); - // eum - expect(transform({ type: "array", items: { enum: ["chocolate", "vanilla"] } })).toBe( + // enum + expect(transform({ type: "array", items: { enum: ["chocolate", "vanilla"] } }, { ...defaults })).toBe( `(('chocolate') | ('vanilla'))[]` ); - expect(transform({ type: "array", items: { enum: ["chocolate", "vanilla"] } }, true)).toBe( - `readonly (('chocolate') | ('vanilla'))[]` - ); - // $ref - expect(transform({ type: "array", items: { $ref: "#/components/schemas/ArrayItem" } })).toBe( + expect(transform({ type: "array", items: { $ref: "#/components/schemas/ArrayItem" } }, { ...defaults })).toBe( `(components["schemas"]["ArrayItem"])[]` ); - expect(transform({ type: "array", items: { $ref: "#/components/schemas/ArrayItem" } }, true)).toBe( - `readonly (components["schemas"]["ArrayItem"])[]` - ); - // inferred - expect(transform({ items: { $ref: "#/components/schemas/ArrayItem" } })).toBe( + expect(transform({ items: { $ref: "#/components/schemas/ArrayItem" } }, { ...defaults })).toBe( `(components["schemas"]["ArrayItem"])[]` ); - expect(transform({ items: { $ref: "#/components/schemas/ArrayItem" } }, true)).toBe( - `readonly (components["schemas"]["ArrayItem"])[]` - ); - // tuple - expect(transform({ type: "array", items: [{ type: "string" }, { type: "number" }] })).toBe(`[string, number]`); - - expect(transform({ type: "array", items: [{ type: "string" }, { type: "number" }] }, true)).toBe( - `readonly [string, number]` + expect(transform({ type: "array", items: [{ type: "string" }, { type: "number" }] }, { ...defaults })).toBe( + `[string, number]` ); // nullable - expect(transform({ type: "array", items: { type: "string" }, nullable: true })).toBe(`((string)[]) | null`); + expect(transform({ type: "array", items: { type: "string" }, nullable: true }, { ...defaults })).toBe( + `((string)[]) | null` + ); + }); - expect(transform({ type: "array", items: { type: "string" }, nullable: true }, true)).toBe( + it("array (immutableTypes)", () => { + // (same as above test, but with immutableTypes: true) + const opts = { ...defaults, immutableTypes: true }; + expect(transform({ type: "array", items: { type: "string" } }, opts)).toBe(`readonly (string)[]`); + expect(transform({ type: "array", items: { type: "number" } }, opts)).toBe(`readonly (number)[]`); + expect(transform({ type: "array", items: { type: "boolean" } }, opts)).toBe(`readonly (boolean)[]`); + expect( + transform( + { type: "array", items: { type: "array", items: { type: "array", items: { type: "number" } } } }, + opts + ) + ).toBe(`readonly (readonly (readonly (number)[])[])[]`); + expect(transform({ type: "array", items: { enum: ["chocolate", "vanilla"] } }, opts)).toBe( + `readonly (('chocolate') | ('vanilla'))[]` + ); + expect(transform({ type: "array", items: { $ref: "#/components/schemas/ArrayItem" } }, opts)).toBe( + `readonly (components["schemas"]["ArrayItem"])[]` + ); + expect(transform({ items: { $ref: "#/components/schemas/ArrayItem" } }, opts)).toBe( + `readonly (components["schemas"]["ArrayItem"])[]` + ); + expect(transform({ type: "array", items: { type: "string" }, nullable: true }, opts)).toBe( `(readonly (string)[]) | null` ); + expect(transform({ type: "array", items: [{ type: "string" }, { type: "number" }] }, opts)).toBe( + `readonly [string, number]` + ); }); it("enum", () => { + const enumBasic = ["Totoro", "Sats'uki", "Mei"]; // note: also tests quotes in enum expect( - transform({ - properties: { string: { type: "string", enum: ["Totoro", "Sats'uki", "Mei"] } }, // note: also tests quotes in enum - type: "object", - }) + transform({ properties: { string: { type: "string", enum: enumBasic } }, type: "object" }, { ...defaults }) ).toBe(`{ "string"?: ('Totoro') | ('Sats\\'uki') | ('Mei'); }`); - expect( - transform({ - properties: { string: { type: "string", enum: ["Totoro", "Sats'uki", "Mei", null] } }, // note: also tests quotes in enum - type: "object", - }) - ).toBe(`{ + const enumNull = ["Totoro", "Sats'uki", "Mei", null]; + expect(transform({ properties: { string: { type: "string", enum: enumNull } }, type: "object" }, { ...defaults })) + .toBe(`{ "string"?: ('Totoro') | ('Sats\\'uki') | ('Mei') | (null); }`); + const enumMixed = ["Totoro", 2, false, null]; expect( - transform({ - properties: { string: { type: "string", enum: ["Totoro", 2, false, null] } }, // note: also tests quotes in enum - type: "object", - }) + transform({ properties: { string: { type: "string", enum: enumMixed } }, type: "object" }, { ...defaults }) ).toBe(`{ "string"?: ('Totoro') | (2) | (false) | (null); }`); + // nullable 1 expect( - transform({ - properties: { string: { type: "string", enum: ["Totoro", 2, false, null], nullable: true } }, // note: also tests quotes in enum - type: "object", - }) + transform( + { properties: { string: { type: "string", enum: enumMixed, nullable: true } }, type: "object" }, + { ...defaults } + ) ).toBe(`{ "string"?: (('Totoro') | (2) | (false)) | null; }`); + // nullable 2 + const enumMixed2 = ["Totoro", 2, false]; expect( - transform({ - properties: { string: { type: "string", enum: ["Totoro", 2, false], nullable: true } }, // note: also tests quotes in enum - type: "object", - }) + transform( + { properties: { string: { type: "string", enum: enumMixed2, nullable: true } }, type: "object" }, + { ...defaults } + ) ).toBe(`{ "string"?: (('Totoro') | (2) | (false)) | null; }`); - expect(transform({ properties: { string: { type: "string", enum: [] } }, type: "object" })).toBe( + // empty + expect(transform({ properties: { string: { type: "string", enum: [] } }, type: "object" }, { ...defaults })).toBe( `{ "string"?: string; @@ -221,56 +204,64 @@ describe("SchemaObject", () => { }); it("$ref", () => { - expect(transform({ $ref: "#/components/parameters/ReferenceObject" })).toBe( + expect(transform({ $ref: "#/components/parameters/ReferenceObject" }, { ...defaults })).toBe( `components["parameters"]["ReferenceObject"]` ); }); // TODO: allow import later it("$ref (external)", () => { - expect(transform({ $ref: "./external.yaml" })).toBe(`any`); + expect(transform({ $ref: "./external.yaml" }, { ...defaults })).toBe(`any`); }); }); describe("advanced", () => { it("additionalProperties", () => { // boolean - expect(transform({ additionalProperties: true })).toBe(`{ [key: string]: any }`); + expect(transform({ additionalProperties: true }, { ...defaults })).toBe(`{ [key: string]: any }`); // empty object - expect(transform({ additionalProperties: {} })).toBe(`{ [key: string]: any }`); + expect(transform({ additionalProperties: {} }, { ...defaults })).toBe(`{ [key: string]: any }`); // type - expect(transform({ additionalProperties: { type: "string" } })).toBe(`{ [key: string]: string; }`); + expect(transform({ additionalProperties: { type: "string" } }, { ...defaults })).toBe( + `{ [key: string]: string; }` + ); // $ref - expect(transform({ additionalProperties: { $ref: "#/definitions/Message" } })).toBe( + expect(transform({ additionalProperties: { $ref: "#/definitions/Message" } }, { ...defaults })).toBe( `{ [key: string]: definitions["Message"]; }` ); }); it("allOf", () => { expect( - transform({ - allOf: [ - { $ref: "#/components/schemas/base" }, - { properties: { string: { type: "string" } }, type: "object" }, - ], - properties: { password: { type: "string" } }, - type: "object", - }) + transform( + { + allOf: [ + { $ref: "#/components/schemas/base" }, + { properties: { string: { type: "string" } }, type: "object" }, + ], + properties: { password: { type: "string" } }, + type: "object", + }, + { ...defaults } + ) ).toBe(`(components["schemas"]["base"]) & ({\n"string"?: string;\n\n}) & ({\n"password"?: string;\n\n})`); }); it("anyOf", () => { expect( - transform({ - anyOf: [ - { $ref: "#/components/schemas/StringType" }, - { $ref: "#/components/schemas/NumberType" }, - { $ref: "#/components/schemas/BooleanType" }, - ], - }) + transform( + { + anyOf: [ + { $ref: "#/components/schemas/StringType" }, + { $ref: "#/components/schemas/NumberType" }, + { $ref: "#/components/schemas/BooleanType" }, + ], + }, + { ...defaults } + ) ).toBe( `(Partial) & (Partial) & (Partial)` ); @@ -279,32 +270,41 @@ describe("SchemaObject", () => { it("oneOf", () => { // standard expect( - transform({ oneOf: [{ type: "string" }, { type: "number" }, { $ref: "#/components/schemas/one_of_ref" }] }) + transform( + { oneOf: [{ type: "string" }, { type: "number" }, { $ref: "#/components/schemas/one_of_ref" }] }, + { ...defaults } + ) ).toBe(`(string) | (number) | (components["schemas"]["one_of_ref"])`); // additionalProperties expect( - transform({ - type: "object", - additionalProperties: { oneOf: [{ type: "string" }, { type: "number" }, { type: "boolean" }] }, - }) + transform( + { + type: "object", + additionalProperties: { oneOf: [{ type: "string" }, { type: "number" }, { type: "boolean" }] }, + }, + { ...defaults } + ) ).toBe(`{ [key: string]: (string) | (number) | (boolean); }`); }); // https://www.jsonschemavalidator.net/s/fOyR2UtQ it("properties + oneOf", () => { expect( - transform({ - properties: { - a: { - type: "string", + transform( + { + properties: { + a: { + type: "string", + }, }, + oneOf: [ + { properties: { b: { type: "string" } }, required: ["b"] }, + { properties: { c: { type: "string" } }, required: ["c"] }, + ], }, - oneOf: [ - { properties: { b: { type: "string" } }, required: ["b"] }, - { properties: { c: { type: "string" } }, required: ["c"] }, - ], - }) + { ...defaults } + ) ).toBe(`(({ "b": string; @@ -319,17 +319,20 @@ describe("SchemaObject", () => { it("properties + anyOf", () => { expect( - transform({ - properties: { - a: { - type: "string", + transform( + { + properties: { + a: { + type: "string", + }, }, + anyOf: [ + { properties: { b: { type: "string" } }, required: ["b"] }, + { properties: { c: { type: "string" } }, required: ["c"] }, + ], }, - anyOf: [ - { properties: { b: { type: "string" } }, required: ["b"] }, - { properties: { c: { type: "string" } }, required: ["c"] }, - ], - }) + { ...defaults } + ) ).toBe(`((Partial<{ "b": string; @@ -346,14 +349,17 @@ describe("SchemaObject", () => { describe("comments", () => { it("basic", () => { expect( - transform({ - type: "object", - properties: { - email: { type: "string", description: "user email" }, - loc: { type: "string", description: "user location" }, - avatar: { type: "string", description: "user photo" }, + transform( + { + type: "object", + properties: { + email: { type: "string", description: "user email" }, + loc: { type: "string", description: "user location" }, + avatar: { type: "string", description: "user photo" }, + }, }, - }) + { ...defaults } + ) ).toBe(`{ /** user email */ "email"?: string; diff --git a/tests/v2/index.test.ts b/tests/v2/index.test.ts index 5af7fa8e1..b25d282b2 100644 --- a/tests/v2/index.test.ts +++ b/tests/v2/index.test.ts @@ -18,7 +18,7 @@ describe("cli", () => { expect(generated).toBe(expected); }); - it(`reads ${schema} spec (v2) from file`, () => { + it(`reads ${schema} spec (v2) from file (immutable types)`, () => { const output = schema.replace(".yaml", ".immutable.ts"); execSync( diff --git a/tests/v3/expected/github.additional.ts b/tests/v3/expected/github.additional.ts new file mode 100644 index 000000000..db97aa21d --- /dev/null +++ b/tests/v3/expected/github.additional.ts @@ -0,0 +1,31284 @@ +/** + * 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/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. The installation's account type (`target_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-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/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"]; + }; + "/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}/grants/{access_token}": { + /** + * **Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/). + * + * 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 token as `:access_token` 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 Applications settings page under "Authorized OAuth Apps" on GitHub](https://github.com/settings/applications#authorized). + */ + delete: operations["apps/revoke-grant-for-application"]; + }; + "/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": { + /** Exchanges a non-repository scoped user-to-server OAuth access token for a repository 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/{client_id}/tokens/{access_token}": { + /** + * **Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/). + * + * 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) 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`. + */ + get: operations["apps/check-authorization"]; + /** + * **Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/). + * + * 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`. + */ + post: operations["apps/reset-authorization"]; + /** + * **Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/). + * + * 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/revoke-authorization-for-application"]; + }; + "/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://help.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://help.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://help.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). + */ + post: operations["oauth-authorizations/create-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"]; + }; + "/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"]; + }; + "/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"]; + }; + "/content_references/{content_reference_id}/attachments": { + /** + * Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` of the content reference from the [`content_reference` event](https://docs.github.com/webhooks/event-payloads/#content_reference) to create an attachment. + * + * The app must create a content attachment within six hours of the content reference URL being posted. See "[Using content attachments](https://docs.github.com/apps/using-content-attachments/)" for details about content attachments. + * + * 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. + */ + post: operations["apps/create-content-attachment"]; + }; + "/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 `admin: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 `admin: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 `admin: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 `admin: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 `admin: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 `admin: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 `admin: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 `admin: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 `admin: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 `admin: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 `admin: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 `admin: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 `admin: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 `admin:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-self-hosted-runners-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 `admin: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 `admin: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 `admin: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}/actions/runners/{runner_id}": { + /** + * Gets a specific self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `admin: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 `admin:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/delete-self-hosted-runner-from-enterprise"]; + }; + "/enterprises/{enterprise}/audit-log": { + /** + * **Note:** The audit log REST API is currently in beta and is subject to change. + * + * 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["audit-log/get-audit-log"]; + }; + "/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://help.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/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://help.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://help.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/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"]; + }; + "/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}/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/{gist_id}/{sha}": { + get: operations["gists/get-revision"]; + }; + "/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://help.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"]; + }; + "/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://help.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/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/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/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/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/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}/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/stable/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}/audit-log": { + /** + * **Note:** The audit log REST API is currently in beta and is subject to change. + * + * 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)." + * + * 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}/credential-authorizations": { + /** + * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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://help.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://help.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}/events": { + get: operations["activity/list-public-org-events"]; + }; + "/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}/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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-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. */ + 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://help.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/{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 25 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` scope. 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` scope. 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-a-package-owned-by-an-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 25 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` scope. 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` scope. 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 + * * `repo` scope to create a private repository + */ + post: operations["repos/create-in-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 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://help.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/packages": { + /** + * Gets the free and paid storage usued 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://help.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://help.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://help.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)." + * + * The `per_page` parameter provides pagination for a list of IdP groups the authenticated user can access in an organization. For example, if the user `octocat` wants to see two groups per page in `octo-org` via cURL, it would look like this: + */ + 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://help.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://help.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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-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 a `Status: 200 OK` 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 a `Status: 200 OK` 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}/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 `role` for organization owners returns as `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-in-org"]; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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://help.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://help.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://help.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://help.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://help.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://help.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/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"]; + }; + "/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"]; + /** + * **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. + */ + post: operations["projects/create-card"]; + }; + "/projects/columns/{column_id}/moves": { + post: operations["projects/move-column"]; + }; + "/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"]; + }; + "/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}": { + /** + * When you pass the `scarlet-witch-preview` media type, requests to get a repository will also return the repository's code of conduct if it can be detected from the repository's code of conduct file. + * + * 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/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/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/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}/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}/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://help.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/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/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/stable/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/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://help.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://help.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://help.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}/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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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://help.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-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/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}/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}/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. 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 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. 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. 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. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + get: operations["code-scanning/list-alerts-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. + * 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. + * 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). + * For an example response, see "[Custom media type for code scanning](#custom-media-type-for-code-scanning)." + * + * **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/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` and `repo:security_events` scopes. + * 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 + * (see the example default response below). + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in the 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 the deletable analysis for one of the sets, + * step through deleting the analyses in that set, + * and 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 `next_analysis_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 `next_analysis_url` value. Alternatively, you could use the `confirm_delete_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. GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * 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 + * ``` + * + * SARIF upload supports a maximum of 1000 results per analysis run. Any results over this limit are ignored. 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. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + get: operations["code-scanning/get-sarif"]; + }; + "/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. + */ + 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. + */ + 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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + * + * For more information the permission levels, see "[Repository permission levels for an organization](https://help.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)". + * + * 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** + * + * To prevent abuse, 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 a `Status: 200 OK` 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://help.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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + post: operations["repos/create-commit-comment"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/pulls": { + /** Lists all pull requests containing the provided commit SHA, which can be from any point in the commit history. The results will 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. + * + * The most recent status for each context is returned, up to 100. This field [paginates](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination) if there are over 100 contexts. + * + * 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/code_of_conduct": { + /** + * Returns the contents of the repository's code of conduct file, if one is detected. + * + * A code of conduct is detected if there is a file named `CODE_OF_CONDUCT` in the root directory of the repository. GitHub detects which code of conduct it is using fuzzy matching. + */ + get: operations["codes-of-conduct/get-for-repo"]; + }; + "/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/{base}...{head}": { + /** + * Both `:base` and `:head` 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** + * + * The response will include a comparison of up to 250 commits. If you are working with a larger commit range, you can use the [List commits](https://docs.github.com/rest/reference/repos#list-commits) to enumerate all commits in the range. + * + * For comparisons with extremely large diffs, you may receive an error response indicating that the diff took too long + * to generate. You can typically resolve this error by using a smaller commit range. + * + * **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}/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/repos#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"]; + /** + * To ensure there can always be an active deployment, you can only delete an _inactive_ deployment. Anyone with `repo` or `repo_deployment` scopes can delete an inactive 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://help.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) or [GitHub Premium Support](https://premium.githubsupport.com). + */ + 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}/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) or [GitHub Premium Support](https://premium.githubsupport.com) 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://help.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://help.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * 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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. + */ + post: operations["issues/create"]; + }; + "/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 a `Status: 200 OK` 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}/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://help.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/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-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 a `Status: 200 OK` 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}/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}/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}/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/latest": { + get: operations["repos/get-latest-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/builds/{build_id}": { + get: operations["repos/get-pages-build"]; + }; + "/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://help.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://help.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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse 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/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 a `Status: 200 OK` 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}/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://help.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://help.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://help.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://help.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://help.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}/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. For more information, see the [`comfort-fade` preview notice](https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request-preview-notices). + * + * **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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-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}/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}/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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + post: operations["repos/create-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/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}/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). + * * 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}/secret-scanning/alerts": { + /** + * Lists all 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}/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://help.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://help.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://help.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://help.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 + * * `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: 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/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"]; + }; + "/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/stable/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"]; + }; + "/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. + * + * When you include the `mercy` preview header, you can also search for multiple topics by adding more `topic:` instances. For example, your query might look like this: + * + * `q=topic:ruby+topic:rails` + */ + 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://help.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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-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 a `Status: 200 OK` 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 a `Status: 200 OK` 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://help.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://help.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://help.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://help.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 `role` for organization owners returns as `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://help.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://help.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://help.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://help.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://help.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://help.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/blocks/{username}": { + get: operations["users/check-blocked"]; + put: operations["users/block"]; + delete: operations["users/unblock"]; + }; + "/user/email/visibility": { + /** Sets the visibility for your primary email addresses. */ + patch: operations["users/set-primary-email-visibility-for-authenticated"]; + }; + "/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"]; + /** This endpoint is accessible with the `user` scope. */ + post: operations["users/add-email-for-authenticated"]; + /** This endpoint is accessible with the `user` scope. */ + delete: operations["users/delete-email-for-authenticated"]; + }; + "/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/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"]; + /** 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/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"]; + /** 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/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"]; + /** + * 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"]; + }; + "/user/interaction-limits": { + /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. If there are no restrictions, you will see an empty response. */ + 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"]; + /** 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/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"]; + /** 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/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-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/{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 25 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` scope. + * 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` scope. 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-a-package-owned-by-the-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 25 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` scope. + * 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` scope. 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/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 + * * `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"]; + patch: operations["repos/accept-invitation"]; + }; + "/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://help.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/{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"]; + }; + "/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"]; + }; + "/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. */ + 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 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://help.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://help.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://help.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: { + /** Simple User */ + "simple-user": + | ({ + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string | null; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + starred_at?: string; + } & { [key: string]: any }) + | null; + /** 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: { + /** Unique identifier of the GitHub app */ + id: number; + /** The slug name of the GitHub app */ + slug?: string; + node_id: string; + owner: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + /** The name of the GitHub app */ + name: string; + description: string | null; + external_url: string; + html_url: string; + created_at: string; + updated_at: string; + /** The set of permissions for the GitHub app */ + permissions: { + issues?: string; + checks?: string; + metadata?: string; + contents?: string; + deployments?: string; + } & { [key: string]: string }; + /** The list of events for the GitHub app */ + events: string[]; + /** The number of installations associated with the GitHub app */ + installations_count?: number; + client_id?: string; + client_secret?: string; + webhook_secret?: string; + pem?: string; + } & { [key: string]: any }; + /** Basic Error */ + "basic-error": { + message?: string; + documentation_url?: string; + } & { [key: string]: any }; + /** Validation Error Simple */ + "validation-error-simple": { + message: string; + documentation_url: string; + errors?: string[]; + } & { [key: string]: any }; + /** The URL to which the payloads will be delivered. */ + "webhook-config-url": string; + /** The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. */ + "webhook-config-content-type": string; + /** 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). */ + "webhook-config-secret": string; + /** Determines whether the SSL certificate of the host for `url` will be verified when delivering payloads. Supported values include `0` (verification is performed) and `1` (verification is not performed). The default is `0`. **We strongly recommend not setting this to `1` as you are subject to man-in-the-middle and other attacks.** */ + "webhook-config-insecure-ssl": string; + /** Configuration object of the webhook */ + "webhook-config": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + } & { [key: string]: any }; + /** An enterprise account */ + enterprise: { + /** A short description of the enterprise. */ + description?: string | null; + html_url: string; + /** The enterprise's website URL. */ + website_url?: string | null; + /** Unique identifier of the enterprise */ + id: number; + node_id: string; + /** The name of the enterprise. */ + name: string; + /** The slug url identifier for the enterprise. */ + slug: string; + created_at: string | null; + updated_at: string | null; + avatar_url: string; + } & { [key: string]: any }; + /** Installation */ + installation: { + /** The ID of the installation. */ + id: number; + account: + | ((Partial & Partial) & { + [key: string]: any; + }) + | null; + /** Describe whether all repositories have been selected or there's a selection involved */ + repository_selection: "all" | "selected"; + access_tokens_url: string; + repositories_url: string; + html_url: string; + app_id: number; + /** The ID of the user or organization this token is being scoped to. */ + target_id: number; + target_type: string; + permissions: { + deployments?: string; + checks?: string; + metadata?: string; + contents?: string; + pull_requests?: string; + statuses?: string; + issues?: string; + organization_administration?: string; + } & { [key: string]: any }; + events: string[]; + created_at: string; + updated_at: string; + single_file_name: string | null; + has_multiple_single_files?: boolean; + single_file_paths?: string[]; + app_slug: string; + suspended_by?: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + suspended_at?: string | null; + contact_email?: string | null; + } & { [key: string]: any }; + /** The permissions granted to the user-to-server access token. */ + "app-permissions": { + /** The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be one of: `read` or `write`. */ + actions?: "read" | "write"; + /** 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`. */ + administration?: "read" | "write"; + /** The level of permission to grant the access token for checks on code. Can be one of: `read` or `write`. */ + checks?: "read" | "write"; + /** The level of permission to grant the access token for notification of content references and creation content attachments. Can be one of: `read` or `write`. */ + content_references?: "read" | "write"; + /** 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`. */ + contents?: "read" | "write"; + /** The level of permission to grant the access token for deployments and deployment statuses. Can be one of: `read` or `write`. */ + deployments?: "read" | "write"; + /** The level of permission to grant the access token for managing repository environments. Can be one of: `read` or `write`. */ + environments?: "read" | "write"; + /** 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`. */ + issues?: "read" | "write"; + /** 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`. */ + metadata?: "read" | "write"; + /** The level of permission to grant the access token for packages published to GitHub Packages. Can be one of: `read` or `write`. */ + packages?: "read" | "write"; + /** 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`. */ + pages?: "read" | "write"; + /** 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`. */ + pull_requests?: "read" | "write"; + /** 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`. */ + repository_hooks?: "read" | "write"; + /** The level of permission to grant the access token to manage repository projects, columns, and cards. Can be one of: `read`, `write`, or `admin`. */ + repository_projects?: "read" | "write" | "admin"; + /** The level of permission to grant the access token to view and manage secret scanning alerts. Can be one of: `read` or `write`. */ + secret_scanning_alerts?: "read" | "write"; + /** The level of permission to grant the access token to manage repository secrets. Can be one of: `read` or `write`. */ + secrets?: "read" | "write"; + /** 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`. */ + security_events?: "read" | "write"; + /** The level of permission to grant the access token to manage just a single file. Can be one of: `read` or `write`. */ + single_file?: "read" | "write"; + /** The level of permission to grant the access token for commit statuses. Can be one of: `read` or `write`. */ + statuses?: "read" | "write"; + /** The level of permission to grant the access token to retrieve Dependabot alerts. Can be one of: `read`. */ + vulnerability_alerts?: "read"; + /** The level of permission to grant the access token to update GitHub Actions workflow files. Can be one of: `write`. */ + workflows?: "write"; + /** The level of permission to grant the access token for organization teams and members. Can be one of: `read` or `write`. */ + members?: "read" | "write"; + /** The level of permission to grant the access token to manage access to an organization. Can be one of: `read` or `write`. */ + organization_administration?: "read" | "write"; + /** 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`. */ + organization_hooks?: "read" | "write"; + /** The level of permission to grant the access token for viewing an organization's plan. Can be one of: `read`. */ + organization_plan?: "read"; + /** The level of permission to grant the access token to manage organization projects, columns, and cards. Can be one of: `read`, `write`, or `admin`. */ + organization_projects?: "read" | "write" | "admin"; + /** The level of permission to grant the access token to manage organization secrets. Can be one of: `read` or `write`. */ + organization_secrets?: "read" | "write"; + /** 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`. */ + organization_self_hosted_runners?: "read" | "write"; + /** 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`. */ + organization_user_blocking?: "read" | "write"; + /** The level of permission to grant the access token to manage team discussions and related comments. Can be one of: `read` or `write`. */ + team_discussions?: "read" | "write"; + } & { [key: string]: any }; + /** License Simple */ + "license-simple": { + key: string; + name: string; + url: string | null; + spdx_id: string | null; + node_id: string; + html_url?: string; + } & { [key: string]: any }; + /** A git repository */ + repository: { + /** Unique identifier of the repository */ + id: number; + node_id: string; + /** The name of the repository. */ + name: string; + full_name: string; + license: (components["schemas"]["license-simple"] & { [key: string]: any }) | null; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + } & { [key: string]: any }; + owner: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + /** Whether the repository is private or public. */ + private: boolean; + html_url: string; + description: string | null; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string | null; + hooks_url: string; + svn_url: string; + homepage: string | null; + language: string | null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + /** The default branch of the repository. */ + default_branch: string; + open_issues_count: number; + /** Whether this repository acts as a template that can be used to generate new repositories. */ + is_template?: boolean; + topics?: string[]; + /** Whether issues are enabled. */ + has_issues: boolean; + /** Whether projects are enabled. */ + has_projects: boolean; + /** Whether the wiki is enabled. */ + has_wiki: boolean; + has_pages: boolean; + /** Whether downloads are enabled. */ + has_downloads: boolean; + /** Whether the repository is archived. */ + archived: boolean; + /** Returns whether or not this repository disabled. */ + disabled: boolean; + /** The repository visibility: public, private, or internal. */ + visibility?: string; + pushed_at: string | null; + created_at: string | null; + updated_at: string | null; + /** Whether to allow rebase merges for pull requests. */ + allow_rebase_merge?: boolean; + template_repository?: + | ({ + id?: number; + node_id?: string; + name?: string; + full_name?: string; + owner?: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + } & { [key: string]: any }; + private?: boolean; + html_url?: string; + description?: string; + fork?: boolean; + url?: string; + archive_url?: string; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + deployments_url?: string; + downloads_url?: string; + events_url?: string; + forks_url?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + languages_url?: string; + merges_url?: string; + milestones_url?: string; + notifications_url?: string; + pulls_url?: string; + releases_url?: string; + ssh_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + clone_url?: string; + mirror_url?: string; + hooks_url?: string; + svn_url?: string; + homepage?: string; + language?: string; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + pushed_at?: string; + created_at?: string; + updated_at?: string; + permissions?: { + admin?: boolean; + push?: boolean; + pull?: boolean; + } & { [key: string]: any }; + allow_rebase_merge?: boolean; + temp_clone_token?: string; + allow_squash_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_merge_commit?: boolean; + subscribers_count?: number; + network_count?: number; + } & { [key: string]: any }) + | null; + temp_clone_token?: string; + /** Whether to allow squash merges for pull requests. */ + allow_squash_merge?: boolean; + /** Whether to delete head branches when pull requests are merged */ + delete_branch_on_merge?: boolean; + /** Whether to allow merge commits for pull requests. */ + allow_merge_commit?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + starred_at?: string; + } & { [key: string]: any }; + /** Authentication token for a GitHub App installed on a user or org. */ + "installation-token": { + token: string; + expires_at: string; + permissions?: { + issues?: string; + contents?: string; + metadata?: string; + single_file?: string; + } & { [key: string]: any }; + repository_selection?: "all" | "selected"; + repositories?: components["schemas"]["repository"][]; + single_file?: string; + has_multiple_single_files?: boolean; + single_file_paths?: string[]; + } & { [key: string]: any }; + /** Validation Error */ + "validation-error": { + message: string; + documentation_url: string; + errors?: ({ + resource?: string; + field?: string; + message?: string; + code: string; + index?: number; + value?: ((string | null) | (number | null) | (string[] | null)) & { [key: string]: any }; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + /** The authorization associated with an OAuth Access. */ + "application-grant": { + id: number; + url: string; + app: { + client_id: string; + name: string; + url: string; + } & { [key: string]: any }; + created_at: string; + updated_at: string; + scopes: string[]; + user?: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + } & { [key: string]: any }; + "scoped-installation": { + permissions: components["schemas"]["app-permissions"]; + /** Describe whether all repositories have been selected or there's a selection involved */ + repository_selection: "all" | "selected"; + single_file_name: string | null; + has_multiple_single_files?: boolean; + single_file_paths?: string[]; + repositories_url: string; + account: components["schemas"]["simple-user"]; + } & { [key: string]: any }; + /** The authorization for an OAuth app, GitHub App, or a Personal Access Token. */ + authorization: { + id: number; + url: string; + /** A list of scopes that this authorization is in. */ + scopes: string[] | null; + token: string; + token_last_eight: string | null; + hashed_token: string | null; + app: { + client_id: string; + name: string; + url: string; + } & { [key: string]: any }; + note: string | null; + note_url: string | null; + updated_at: string; + created_at: string; + fingerprint: string | null; + user?: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + installation?: (components["schemas"]["scoped-installation"] & { [key: string]: any }) | null; + } & { [key: string]: any }; + /** Code Of Conduct */ + "code-of-conduct": { + key: string; + name: string; + url: string; + body?: string; + html_url: string | null; + } & { [key: string]: any }; + /** Content Reference attachments allow you to provide context around URLs posted in comments */ + "content-reference-attachment": { + /** The ID of the attachment */ + id: number; + /** The title of the attachment */ + title: string; + /** The body of the attachment */ + body: string; + /** The node_id of the content attachment */ + node_id?: string; + } & { [key: string]: any }; + /** The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. */ + "enabled-organizations": "all" | "none" | "selected"; + /** The permissions policy that controls the actions that are allowed to run. Can be one of: `all`, `local_only`, or `selected`. */ + "allowed-actions": "all" | "local_only" | "selected"; + /** 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; + "actions-enterprise-permissions": { + enabled_organizations: components["schemas"]["enabled-organizations"]; + /** 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; + allowed_actions: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + } & { [key: string]: any }; + /** Organization Simple */ + "organization-simple": { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string | null; + } & { [key: string]: any }; + "selected-actions": { + /** Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. */ + github_owned_allowed: boolean; + /** 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; + /** 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[]; + } & { [key: string]: any }; + "runner-groups-enterprise": { + id: number; + name: string; + visibility: string; + default: boolean; + selected_organizations_url?: string; + runners_url: string; + allows_public_repositories: boolean; + } & { [key: string]: any }; + /** A self hosted runner */ + runner: { + /** The id of the runner. */ + id: number; + /** The name of the runner. */ + name: string; + /** The Operating System of the runner. */ + os: string; + /** The status of the runner. */ + status: string; + busy: boolean; + labels: ({ + /** Unique identifier of the label. */ + id?: number; + /** Name of the label. */ + name?: string; + /** The type of label. Read-only labels are applied automatically when the runner is configured. */ + type?: "read-only" | "custom"; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + /** Runner Application */ + "runner-application": { + os: string; + architecture: string; + download_url: string; + filename: string; + } & { [key: string]: any }; + /** Authentication Token */ + "authentication-token": { + /** The token used for authentication */ + token: string; + /** The time this token expires */ + expires_at: string; + permissions?: { [key: string]: any }; + /** The repositories this token has access to */ + repositories?: components["schemas"]["repository"][]; + single_file?: string | null; + /** Describe whether all repositories have been selected or there's a selection involved */ + repository_selection?: "all" | "selected"; + } & { [key: string]: any }; + "audit-log-event": { + /** The time the audit log event occurred, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). */ + "@timestamp"?: number; + /** The name of the action that was performed, for example `user.login` or `repo.create`. */ + action?: string; + active?: boolean; + active_was?: boolean; + /** The actor who performed the action. */ + actor?: string; + /** The username of the account being blocked. */ + blocked_user?: string; + business?: string; + config?: any[]; + config_was?: any[]; + content_type?: string; + /** The time the audit log event was recorded, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). */ + created_at?: number; + deploy_key_fingerprint?: string; + emoji?: string; + events?: any[]; + events_were?: any[]; + explanation?: string; + fingerprint?: string; + hook_id?: number; + limited_availability?: boolean; + message?: string; + name?: string; + old_user?: string; + openssh_public_key?: string; + org?: string; + previous_visibility?: string; + read_only?: boolean; + /** The name of the repository. */ + repo?: string; + /** The name of the repository. */ + repository?: string; + repository_public?: boolean; + target_login?: string; + team?: string; + /** The type of protocol (for example, HTTP or SSH) used to transfer Git data. */ + transport_protocol?: number; + /** A human readable name for the protocol (for example, HTTP or SSH) used to transfer Git data. */ + transport_protocol_name?: string; + /** The user that was affected by the action performed (if available). */ + user?: string; + /** The repository visibility, for example `public` or `private`. */ + visibility?: string; + } & { [key: string]: any }; + "actions-billing-usage": { + /** The sum of the free and paid GitHub Actions minutes used. */ + total_minutes_used: number; + /** The total paid GitHub Actions minutes used. */ + total_paid_minutes_used: number; + /** The amount of free GitHub Actions minutes available. */ + included_minutes: number; + minutes_used_breakdown: { + /** Total minutes used on Ubuntu runner machines. */ + UBUNTU?: number; + /** Total minutes used on macOS runner machines. */ + MACOS?: number; + /** Total minutes used on Windows runner machines. */ + WINDOWS?: number; + } & { [key: string]: any }; + } & { [key: string]: any }; + "packages-billing-usage": { + /** Sum of the free and paid storage space (GB) for GitHuub Packages. */ + total_gigabytes_bandwidth_used: number; + /** Total paid storage space (GB) for GitHuub Packages. */ + total_paid_gigabytes_bandwidth_used: number; + /** Free storage space (GB) for GitHub Packages. */ + included_gigabytes_bandwidth: number; + } & { [key: string]: any }; + "combined-billing-usage": { + /** Numbers of days left in billing cycle. */ + days_left_in_billing_cycle: number; + /** Estimated storage space (GB) used in billing cycle. */ + estimated_paid_storage_for_month: number; + /** Estimated sum of free and paid storage space (GB) used in billing cycle. */ + estimated_storage_for_month: number; + } & { [key: string]: any }; + /** Actor */ + actor: { + id: number; + login: string; + display_login?: string; + gravatar_id: string | null; + url: string; + avatar_url: string; + } & { [key: string]: any }; + /** Color-coded labels help you categorize and filter your issues (just like labels in Gmail). */ + label: { + id: number; + node_id: string; + /** URL for the label */ + url: string; + /** The name of the label. */ + name: string; + description: string | null; + /** 6-character hex code, without the leading #, identifying the color */ + color: string; + default: boolean; + } & { [key: string]: any }; + /** A collection of related issues and pull requests. */ + milestone: { + url: string; + html_url: string; + labels_url: string; + id: number; + node_id: string; + /** The number of the milestone. */ + number: number; + /** The state of the milestone. */ + state: "open" | "closed"; + /** The title of the milestone. */ + title: string; + description: string | null; + creator: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + open_issues: number; + closed_issues: number; + created_at: string; + updated_at: string; + closed_at: string | null; + due_on: string | null; + } & { [key: string]: any }; + /** How the author is associated with the repository. */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** Issue Simple */ + "issue-simple": { + id: number; + node_id: string; + url: string; + repository_url: string; + labels_url: string; + comments_url: string; + events_url: string; + html_url: string; + number: number; + state: string; + title: string; + body?: string; + user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + labels: components["schemas"]["label"][]; + assignee: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + assignees?: components["schemas"]["simple-user"][] | null; + milestone: (components["schemas"]["milestone"] & { [key: string]: any }) | null; + locked: boolean; + active_lock_reason?: string | null; + comments: number; + pull_request?: { + merged_at?: string | null; + diff_url: string | null; + html_url: string | null; + patch_url: string | null; + url: string | null; + } & { [key: string]: any }; + closed_at: string | null; + created_at: string; + updated_at: string; + author_association: components["schemas"]["author_association"]; + body_html?: string; + body_text?: string; + timeline_url?: string; + repository?: components["schemas"]["repository"]; + performed_via_github_app?: (components["schemas"]["integration"] & { [key: string]: any }) | null; + } & { [key: string]: any }; + "reaction-rollup": { + url: string; + total_count: number; + "+1": number; + "-1": number; + laugh: number; + confused: number; + heart: number; + hooray: number; + eyes: number; + rocket: number; + } & { [key: string]: any }; + /** Comments provide a way for people to collaborate on an issue. */ + "issue-comment": { + /** Unique identifier of the issue comment */ + id: number; + node_id: string; + /** URL for the issue comment */ + url: string; + /** Contents of the issue comment */ + body?: string; + body_text?: string; + body_html?: string; + html_url: string; + user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + created_at: string; + updated_at: string; + issue_url: string; + author_association: components["schemas"]["author_association"]; + performed_via_github_app?: (components["schemas"]["integration"] & { [key: string]: any }) | null; + reactions?: components["schemas"]["reaction-rollup"]; + } & { [key: string]: any }; + /** Event */ + event: { + id: string; + type: string | null; + actor: components["schemas"]["actor"]; + repo: { + id: number; + name: string; + url: string; + } & { [key: string]: any }; + org?: components["schemas"]["actor"]; + payload: { + action: string; + issue?: components["schemas"]["issue-simple"]; + comment?: components["schemas"]["issue-comment"]; + pages?: ({ + page_name?: string; + title?: string; + summary?: string | null; + action?: string; + sha?: string; + html_url?: string; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + public: boolean; + created_at: string | null; + } & { [key: string]: any }; + /** Hypermedia Link with Type */ + "link-with-type": { + href: string; + type: string; + } & { [key: string]: any }; + /** Feed */ + feed: { + timeline_url: string; + user_url: string; + current_user_public_url?: string; + current_user_url?: string; + current_user_actor_url?: string; + current_user_organization_url?: string; + current_user_organization_urls?: string[]; + security_advisories_url?: string; + _links: { + timeline: components["schemas"]["link-with-type"]; + user: components["schemas"]["link-with-type"]; + security_advisories?: components["schemas"]["link-with-type"]; + current_user?: components["schemas"]["link-with-type"]; + current_user_public?: 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"][]; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** Base Gist */ + "base-gist": { + url: string; + forks_url: string; + commits_url: string; + id: string; + node_id: string; + git_pull_url: string; + git_push_url: string; + html_url: string; + files: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + } & { [key: string]: any }; + }; + public: boolean; + created_at: string; + updated_at: string; + description: string | null; + comments: number; + user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + comments_url: string; + owner?: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + truncated?: boolean; + forks?: { [key: string]: any }[]; + history?: { [key: string]: any }[]; + } & { [key: string]: any }; + /** Gist Simple */ + "gist-simple": { + url?: string; + forks_url?: string; + commits_url?: string; + id?: string; + node_id?: string; + git_pull_url?: string; + git_push_url?: string; + html_url?: string; + files?: { + [key: string]: + | ({ + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + truncated?: boolean; + content?: string; + } & { [key: string]: any }) + | null; + }; + public?: boolean; + created_at?: string; + updated_at?: string; + description?: string | null; + comments?: number; + user?: string | null; + comments_url?: string; + owner?: components["schemas"]["simple-user"]; + truncated?: boolean; + } & { [key: string]: any }; + /** A comment made to a gist. */ + "gist-comment": { + id: number; + node_id: string; + url: string; + /** The comment text. */ + body: string; + user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + created_at: string; + updated_at: string; + author_association: components["schemas"]["author_association"]; + } & { [key: string]: any }; + /** Gist Commit */ + "gist-commit": { + url: string; + version: string; + user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + change_status: { + total?: number; + additions?: number; + deletions?: number; + } & { [key: string]: any }; + committed_at: string; + } & { [key: string]: any }; + /** Gitignore Template */ + "gitignore-template": { + name: string; + source: string; + } & { [key: string]: any }; + /** Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. */ + issue: { + id: number; + node_id: string; + /** URL for the issue */ + url: string; + repository_url: string; + labels_url: string; + comments_url: string; + events_url: string; + html_url: string; + /** Number uniquely identifying the issue within its repository */ + number: number; + /** State of the issue; either 'open' or 'closed' */ + state: string; + /** Title of the issue */ + title: string; + /** Contents of the issue */ + body?: string; + user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + /** 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 */ + labels: (( + | string + | ({ + id?: number; + node_id?: string; + url?: string; + name?: string; + description?: string | null; + color?: string | null; + default?: boolean; + } & { [key: string]: any }) + ) & { [key: string]: any })[]; + assignee: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + assignees?: components["schemas"]["simple-user"][] | null; + milestone: (components["schemas"]["milestone"] & { [key: string]: any }) | null; + locked: boolean; + active_lock_reason?: string | null; + comments: number; + pull_request?: { + merged_at?: string | null; + diff_url: string | null; + html_url: string | null; + patch_url: string | null; + url: string | null; + } & { [key: string]: any }; + closed_at: string | null; + created_at: string; + updated_at: string; + closed_by?: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + body_html?: string; + body_text?: string; + timeline_url?: string; + repository?: components["schemas"]["repository"]; + performed_via_github_app?: (components["schemas"]["integration"] & { [key: string]: any }) | null; + author_association: components["schemas"]["author_association"]; + reactions?: components["schemas"]["reaction-rollup"]; + } & { [key: string]: any }; + /** License */ + license: { + key: string; + name: string; + spdx_id: string | null; + url: string | null; + node_id: string; + html_url: string; + description: string; + implementation: string; + permissions: string[]; + conditions: string[]; + limitations: string[]; + body: string; + featured: boolean; + } & { [key: string]: any }; + /** Marketplace Listing Plan */ + "marketplace-listing-plan": { + url: string; + accounts_url: string; + id: number; + number: number; + name: string; + description: string; + monthly_price_in_cents: number; + yearly_price_in_cents: number; + price_model: string; + has_free_trial: boolean; + unit_name: string | null; + state: string; + bullets: string[]; + } & { [key: string]: any }; + /** Marketplace Purchase */ + "marketplace-purchase": { + url: string; + type: string; + id: number; + login: string; + organization_billing_email?: string; + marketplace_pending_change?: + | ({ + is_installed?: boolean; + effective_date?: string; + unit_count?: number | null; + id?: number; + plan?: components["schemas"]["marketplace-listing-plan"]; + } & { [key: string]: any }) + | null; + marketplace_purchase: { + billing_cycle?: string; + next_billing_date?: string | null; + is_installed?: boolean; + unit_count?: number | null; + on_free_trial?: boolean; + free_trial_ends_on?: string | null; + updated_at?: string; + plan?: components["schemas"]["marketplace-listing-plan"]; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** Api Overview */ + "api-overview": { + verifiable_password_authentication: boolean; + ssh_key_fingerprints?: { + SHA256_RSA?: string; + SHA256_DSA?: string; + } & { [key: string]: any }; + hooks?: string[]; + web?: string[]; + api?: string[]; + git?: string[]; + pages?: string[]; + importer?: string[]; + actions?: string[]; + } & { [key: string]: any }; + /** Minimal Repository */ + "minimal-repository": { + id: number; + node_id: string; + name: string; + full_name: string; + owner: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + private: boolean; + html_url: string; + description: string | null; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url?: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url?: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url?: string; + mirror_url?: string | null; + hooks_url: string; + svn_url?: string; + homepage?: string | null; + language?: string | null; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + pushed_at?: string | null; + created_at?: string | null; + updated_at?: string | null; + permissions?: { + admin?: boolean; + push?: boolean; + pull?: boolean; + } & { [key: string]: any }; + template_repository?: (components["schemas"]["repository"] & { [key: string]: any }) | null; + temp_clone_token?: string; + delete_branch_on_merge?: boolean; + subscribers_count?: number; + network_count?: number; + license?: + | ({ + key?: string; + name?: string; + spdx_id?: string; + url?: string; + node_id?: string; + } & { [key: string]: any }) + | null; + forks?: number; + open_issues?: number; + watchers?: number; + } & { [key: string]: any }; + /** Thread */ + thread: { + id: string; + repository: components["schemas"]["minimal-repository"]; + subject: { + title: string; + url: string; + latest_comment_url: string; + type: string; + } & { [key: string]: any }; + reason: string; + unread: boolean; + updated_at: string; + last_read_at: string | null; + url: string; + subscription_url: string; + } & { [key: string]: any }; + /** Thread Subscription */ + "thread-subscription": { + subscribed: boolean; + ignored: boolean; + reason: string | null; + created_at: string | null; + url: string; + thread_url?: string; + repository_url?: string; + } & { [key: string]: any }; + /** Organization Full */ + "organization-full": { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string | null; + name?: string; + company?: string; + blog?: string; + location?: string; + email?: string; + twitter_username?: string | null; + is_verified?: boolean; + has_organization_projects: boolean; + has_repository_projects: boolean; + public_repos: number; + public_gists: number; + followers: number; + following: number; + html_url: string; + created_at: string; + type: string; + total_private_repos?: number; + owned_private_repos?: number; + private_gists?: number | null; + disk_usage?: number | null; + collaborators?: number | null; + billing_email?: string | null; + plan?: { + name: string; + space: number; + private_repos: number; + filled_seats?: number; + seats?: number; + } & { [key: string]: any }; + default_repository_permission?: string | null; + members_can_create_repositories?: boolean | null; + two_factor_requirement_enabled?: boolean | null; + members_allowed_repository_creation_type?: string; + members_can_create_public_repositories?: boolean; + members_can_create_private_repositories?: boolean; + members_can_create_internal_repositories?: boolean; + members_can_create_pages?: boolean; + updated_at: string; + } & { [key: string]: any }; + /** The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. */ + "enabled-repositories": "all" | "none" | "selected"; + "actions-organization-permissions": { + enabled_repositories: components["schemas"]["enabled-repositories"]; + /** 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; + allowed_actions: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + } & { [key: string]: any }; + "runner-groups-org": { + id: number; + name: string; + visibility: string; + default: boolean; + /** Link to the selected repositories resource for this runner group. Not present unless visibility was set to `selected` */ + selected_repositories_url?: string; + runners_url: string; + inherited: boolean; + inherited_allows_public_repositories?: boolean; + allows_public_repositories: boolean; + } & { [key: string]: any }; + /** Secrets for GitHub Actions for an organization. */ + "organization-actions-secret": { + /** The name of the secret. */ + name: string; + created_at: string; + updated_at: string; + /** Visibility of a secret */ + visibility: "all" | "private" | "selected"; + selected_repositories_url?: string; + } & { [key: string]: any }; + /** The public key used for setting Actions Secrets. */ + "actions-public-key": { + /** The identifier for the key. */ + key_id: string; + /** The Base64 encoded public key. */ + key: string; + id?: number; + url?: string; + title?: string; + created_at?: string; + } & { [key: string]: any }; + /** Credential Authorization */ + "credential-authorization": { + /** User login that owns the underlying credential. */ + login: string; + /** Unique identifier for the credential. */ + credential_id: number; + /** Human-readable description of the credential type. */ + credential_type: string; + /** Last eight characters of the credential. Only included in responses with credential_type of personal access token. */ + token_last_eight?: string; + /** Date when the credential was authorized for use. */ + credential_authorized_at: string; + /** List of oauth scopes the token has been granted. */ + scopes?: string[]; + /** Unique string to distinguish the credential. Only included in responses with credential_type of SSH Key. */ + fingerprint?: string; + /** Date when the credential was last accessed. May be null if it was never accessed */ + credential_accessed_at?: string | null; + authorized_credential_id?: number | null; + /** The title given to the ssh key. This will only be present when the credential is an ssh key. */ + authorized_credential_title?: string | null; + /** The note given to the token. This will only be present when the credential is a token. */ + authorized_credential_note?: string | null; + } & { [key: string]: any }; + /** Organization Invitation */ + "organization-invitation": { + id: number; + login: string | null; + email: string | null; + role: string; + created_at: string; + failed_at?: string; + failed_reason?: string; + inviter: components["schemas"]["simple-user"]; + team_count: number; + invitation_team_url: string; + node_id: string; + invitation_teams_url?: string; + } & { [key: string]: any }; + /** Org Hook */ + "org-hook": { + id: number; + url: string; + ping_url: string; + name: string; + events: string[]; + active: boolean; + config: { + url?: string; + insecure_ssl?: string; + content_type?: string; + secret?: string; + } & { [key: string]: any }; + updated_at: string; + created_at: string; + type: string; + } & { [key: string]: any }; + /** 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`. */ + "interaction-group": "existing_users" | "contributors_only" | "collaborators_only"; + /** Interaction limit settings. */ + "interaction-limit-response": { + limit: components["schemas"]["interaction-group"]; + origin: string; + expires_at: string; + } & { [key: string]: any }; + /** The duration of the interaction restriction. Can be one of: `one_day`, `three_days`, `one_week`, `one_month`, `six_months`. Default: `one_day`. */ + "interaction-expiry": "one_day" | "three_days" | "one_week" | "one_month" | "six_months"; + /** Limit interactions to a specific type of user for a specified duration */ + "interaction-limit": { + limit: components["schemas"]["interaction-group"]; + expiry?: components["schemas"]["interaction-expiry"]; + } & { [key: string]: any }; + /** Groups of organization members that gives permissions on specified repositories. */ + "team-simple": + | ({ + /** Unique identifier of the team */ + id: number; + node_id: string; + /** URL for the team */ + url: string; + members_url: string; + /** Name of the team */ + name: string; + /** Description of the team */ + description: string | null; + /** Permission that the team will have for its repositories */ + permission: string; + /** The level of privacy this team should have */ + privacy?: string; + html_url: string; + repositories_url: string; + slug: string; + /** Distinguished Name (DN) that team maps to within LDAP environment */ + ldap_dn?: string; + } & { [key: string]: any }) + | null; + /** Groups of organization members that gives permissions on specified repositories. */ + team: { + id: number; + node_id: string; + name: string; + slug: string; + description: string | null; + privacy?: string; + permission: string; + url: string; + html_url: string; + members_url: string; + repositories_url: string; + parent?: (components["schemas"]["team-simple"] & { [key: string]: any }) | null; + } & { [key: string]: any }; + /** Org Membership */ + "org-membership": { + url: string; + state: string; + role: string; + organization_url: string; + organization: components["schemas"]["organization-simple"]; + user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + permissions?: { + can_create_repository: boolean; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** A migration. */ + migration: { + id: number; + owner: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + guid: string; + state: string; + lock_repositories: boolean; + exclude_attachments: boolean; + repositories: components["schemas"]["repository"][]; + url: string; + created_at: string; + updated_at: string; + node_id: string; + archive_url?: string; + exclude?: { [key: string]: any }[]; + } & { [key: string]: any }; + /** A software package */ + package: { + /** Unique identifier of the package. */ + id: number; + /** The name of the package. */ + name: string; + package_type: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container"; + url: string; + html_url: string; + /** The number of versions of the package. */ + version_count: number; + visibility: "private" | "public"; + owner?: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + repository?: (components["schemas"]["minimal-repository"] & { [key: string]: any }) | null; + created_at: string; + updated_at: string; + } & { [key: string]: any }; + /** A version of a software package */ + "package-version": { + /** Unique identifier of the package version. */ + id: number; + /** The name of the package version. */ + name: string; + url: string; + package_html_url: string; + html_url?: string; + license?: string; + description?: string; + created_at: string; + updated_at: string; + deleted_at?: string; + metadata?: { + package_type: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container"; + container?: { + tags: any[]; + } & { [key: string]: any }; + docker?: { + tag?: any[]; + } & { [key: string]: any }; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** Projects are a way to organize columns and cards of work. */ + project: { + owner_url: string; + url: string; + html_url: string; + columns_url: string; + id: number; + node_id: string; + /** Name of the project */ + name: string; + /** Body of the project */ + body: string | null; + number: number; + /** State of the project; either 'open' or 'closed' */ + state: string; + creator: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + created_at: string; + updated_at: string; + /** The baseline permission that all organization members have on this project. Only present if owner is an organization. */ + organization_permission?: "read" | "write" | "admin" | "none"; + /** Whether or not this project can be seen by everyone. Only present if owner is an organization. */ + private?: boolean; + } & { [key: string]: any }; + /** External Groups to be mapped to a team for membership */ + "group-mapping": { + /** Array of groups to be mapped to this team */ + groups?: ({ + /** The ID of the group */ + group_id: string; + /** The name of the group */ + group_name: string; + /** a description of the group */ + group_description: string; + /** synchronization status for this group mapping */ + status?: string; + /** the time of the last sync for this group-mapping */ + synced_at?: string; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + /** Groups of organization members that gives permissions on specified repositories. */ + "team-full": { + /** Unique identifier of the team */ + id: number; + node_id: string; + /** URL for the team */ + url: string; + html_url: string; + /** Name of the team */ + name: string; + slug: string; + description: string | null; + /** The level of privacy this team should have */ + privacy?: "closed" | "secret"; + /** Permission that the team will have for its repositories */ + permission: string; + members_url: string; + repositories_url: string; + parent?: (components["schemas"]["team-simple"] & { [key: string]: any }) | null; + members_count: number; + repos_count: number; + created_at: string; + updated_at: string; + organization: components["schemas"]["organization-full"]; + /** Distinguished Name (DN) that team maps to within LDAP environment */ + ldap_dn?: string; + } & { [key: string]: any }; + /** A team discussion is a persistent record of a free-form conversation within a team. */ + "team-discussion": { + author: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + /** The main text of the discussion. */ + body: string; + body_html: string; + /** 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. */ + body_version: string; + comments_count: number; + comments_url: string; + created_at: string; + last_edited_at: string | null; + html_url: string; + node_id: string; + /** The unique sequence number of a team discussion. */ + number: number; + /** Whether or not this discussion should be pinned for easy retrieval. */ + pinned: boolean; + /** Whether or not this discussion should be restricted to team members and organization administrators. */ + private: boolean; + team_url: string; + /** The title of the discussion. */ + title: string; + updated_at: string; + url: string; + reactions?: components["schemas"]["reaction-rollup"]; + } & { [key: string]: any }; + /** A reply to a discussion within a team. */ + "team-discussion-comment": { + author: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + /** The main text of the comment. */ + body: string; + body_html: string; + /** 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. */ + body_version: string; + created_at: string; + last_edited_at: string | null; + discussion_url: string; + html_url: string; + node_id: string; + /** The unique sequence number of a team discussion comment. */ + number: number; + updated_at: string; + url: string; + reactions?: components["schemas"]["reaction-rollup"]; + } & { [key: string]: any }; + /** Reactions to conversations provide a way to help people express their feelings more simply and effectively. */ + reaction: { + id: number; + node_id: string; + user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + /** The reaction to use */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + created_at: string; + } & { [key: string]: any }; + /** Team Membership */ + "team-membership": { + url: string; + /** The role of the user in the team. */ + role: "member" | "maintainer"; + state: string; + } & { [key: string]: any }; + /** A team's access to a project. */ + "team-project": { + owner_url: string; + url: string; + html_url: string; + columns_url: string; + id: number; + node_id: string; + name: string; + body: string | null; + number: number; + state: string; + creator: components["schemas"]["simple-user"]; + created_at: string; + updated_at: string; + /** The organization permission for this project. Only present when owner is an organization. */ + organization_permission?: string; + /** Whether the project is private or not. Only present when owner is an organization. */ + private?: boolean; + permissions: { + read: boolean; + write: boolean; + admin: boolean; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** A team's access to a repository. */ + "team-repository": { + /** Unique identifier of the repository */ + id: number; + node_id: string; + /** The name of the repository. */ + name: string; + full_name: string; + license: (components["schemas"]["license-simple"] & { [key: string]: any }) | null; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + } & { [key: string]: any }; + owner: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + /** Whether the repository is private or public. */ + private: boolean; + html_url: string; + description: string | null; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string | null; + hooks_url: string; + svn_url: string; + homepage: string | null; + language: string | null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + /** The default branch of the repository. */ + default_branch: string; + open_issues_count: number; + /** Whether this repository acts as a template that can be used to generate new repositories. */ + is_template?: boolean; + topics?: string[]; + /** Whether issues are enabled. */ + has_issues: boolean; + /** Whether projects are enabled. */ + has_projects: boolean; + /** Whether the wiki is enabled. */ + has_wiki: boolean; + has_pages: boolean; + /** Whether downloads are enabled. */ + has_downloads: boolean; + /** Whether the repository is archived. */ + archived: boolean; + /** Returns whether or not this repository disabled. */ + disabled: boolean; + /** The repository visibility: public, private, or internal. */ + visibility?: string; + pushed_at: string | null; + created_at: string | null; + updated_at: string | null; + /** Whether to allow rebase merges for pull requests. */ + allow_rebase_merge?: boolean; + template_repository?: (components["schemas"]["repository"] & { [key: string]: any }) | null; + temp_clone_token?: string; + /** Whether to allow squash merges for pull requests. */ + allow_squash_merge?: boolean; + /** Whether to delete head branches when pull requests are merged */ + delete_branch_on_merge?: boolean; + /** Whether to allow merge commits for pull requests. */ + allow_merge_commit?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + } & { [key: string]: any }; + /** Project cards represent a scope of work. */ + "project-card": { + url: string; + /** The project card's ID */ + id: number; + node_id: string; + note: string | null; + creator: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + created_at: string; + updated_at: string; + /** Whether or not the card is archived */ + archived?: boolean; + column_url: string; + content_url?: string; + project_url: string; + } & { [key: string]: any }; + /** Project columns contain cards of work. */ + "project-column": { + url: string; + project_url: string; + cards_url: string; + /** The unique identifier of the project column */ + id: number; + node_id: string; + /** Name of the project column */ + name: string; + created_at: string; + updated_at: string; + } & { [key: string]: any }; + /** Repository Collaborator Permission */ + "repository-collaborator-permission": { + permission: string; + user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + } & { [key: string]: any }; + "rate-limit": { + limit: number; + remaining: number; + reset: number; + } & { [key: string]: any }; + /** Rate Limit Overview */ + "rate-limit-overview": { + resources: { + core: components["schemas"]["rate-limit"]; + graphql?: components["schemas"]["rate-limit"]; + search: components["schemas"]["rate-limit"]; + source_import?: components["schemas"]["rate-limit"]; + integration_manifest?: components["schemas"]["rate-limit"]; + code_scanning_upload?: components["schemas"]["rate-limit"]; + } & { [key: string]: any }; + rate: components["schemas"]["rate-limit"]; + } & { [key: string]: any }; + /** Code of Conduct Simple */ + "code-of-conduct-simple": { + url: string; + key: string; + name: string; + html_url: string | null; + } & { [key: string]: any }; + /** Full Repository */ + "full-repository": { + id: number; + node_id: string; + name: string; + full_name: string; + owner: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + private: boolean; + html_url: string; + description: string | null; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string | null; + hooks_url: string; + svn_url: string; + homepage: string | null; + language: string | null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template?: boolean; + topics?: string[]; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + /** Returns whether or not this repository disabled. */ + disabled: boolean; + /** The repository visibility: public, private, or internal. */ + visibility?: string; + pushed_at: string; + created_at: string; + updated_at: string; + permissions?: { + admin: boolean; + pull: boolean; + push: boolean; + } & { [key: string]: any }; + allow_rebase_merge?: boolean; + template_repository?: (components["schemas"]["repository"] & { [key: string]: any }) | null; + temp_clone_token?: string | null; + allow_squash_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_merge_commit?: boolean; + subscribers_count: number; + network_count: number; + license: (components["schemas"]["license-simple"] & { [key: string]: any }) | null; + organization?: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + parent?: components["schemas"]["repository"]; + source?: components["schemas"]["repository"]; + forks: number; + master_branch?: string; + open_issues: number; + watchers: number; + /** Whether anonymous git access is allowed. */ + anonymous_access_enabled?: boolean; + code_of_conduct?: components["schemas"]["code-of-conduct-simple"]; + } & { [key: string]: any }; + /** An artifact */ + artifact: { + id: number; + node_id: string; + /** The name of the artifact. */ + name: string; + /** The size in bytes of the artifact. */ + size_in_bytes: number; + url: string; + archive_download_url: string; + /** Whether or not the artifact has expired. */ + expired: boolean; + created_at: string | null; + expires_at: string; + updated_at: string | null; + } & { [key: string]: any }; + /** Information of a job execution in a workflow run */ + job: { + /** The id of the job. */ + id: number; + /** The id of the associated workflow run. */ + run_id: number; + run_url: string; + node_id: string; + /** The SHA of the commit that is being run. */ + head_sha: string; + url: string; + html_url: string | null; + /** The phase of the lifecycle that the job is currently in. */ + status: "queued" | "in_progress" | "completed"; + /** The outcome of the job. */ + conclusion: string | null; + /** The time that the job started, in ISO 8601 format. */ + started_at: string; + /** The time that the job finished, in ISO 8601 format. */ + completed_at: string | null; + /** The name of the job. */ + name: string; + /** Steps in this job. */ + steps?: ({ + /** The phase of the lifecycle that the job is currently in. */ + status: "queued" | "in_progress" | "completed"; + /** The outcome of the job. */ + conclusion: string | null; + /** The name of the job. */ + name: string; + number: number; + /** The time that the step started, in ISO 8601 format. */ + started_at?: string | null; + /** The time that the job finished, in ISO 8601 format. */ + completed_at?: string | null; + } & { [key: string]: any })[]; + check_run_url: string; + } & { [key: string]: any }; + /** Whether GitHub Actions is enabled on the repository. */ + "actions-enabled": boolean; + "actions-repository-permissions": { + enabled: components["schemas"]["actions-enabled"]; + allowed_actions: components["schemas"]["allowed-actions"]; + selected_actions_url?: components["schemas"]["selected-actions-url"]; + } & { [key: string]: any }; + "pull-request-minimal": { + id: number; + number: number; + url: string; + head: { + ref: string; + sha: string; + repo: { + id: number; + url: string; + name: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + base: { + ref: string; + sha: string; + repo: { + id: number; + url: string; + name: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** Simple Commit */ + "simple-commit": { + id: string; + tree_id: string; + message: string; + timestamp: string; + author: + | ({ + name: string; + email: string; + } & { [key: string]: any }) + | null; + committer: + | ({ + name: string; + email: string; + } & { [key: string]: any }) + | null; + } & { [key: string]: any }; + /** An invocation of a workflow */ + "workflow-run": { + /** The ID of the workflow run. */ + id: number; + /** The name of the workflow run. */ + name?: string; + node_id: string; + head_branch: string | null; + /** The SHA of the head commit that points to the version of the worflow being run. */ + head_sha: string; + /** The auto incrementing run number for the workflow run. */ + run_number: number; + event: string; + status: string | null; + conclusion: string | null; + /** The ID of the parent workflow. */ + workflow_id: number; + /** The URL to the workflow run. */ + url: string; + html_url: string; + pull_requests: components["schemas"]["pull-request-minimal"][] | null; + created_at: string; + updated_at: string; + /** The URL to the jobs for the workflow run. */ + jobs_url: string; + /** The URL to download the logs for the workflow run. */ + logs_url: string; + /** The URL to the associated check suite. */ + check_suite_url: string; + /** The URL to the artifacts for the workflow run. */ + artifacts_url: string; + /** The URL to cancel the workflow run. */ + cancel_url: string; + /** The URL to rerun the workflow run. */ + rerun_url: string; + /** The URL to the workflow. */ + workflow_url: string; + head_commit: components["schemas"]["simple-commit"]; + repository: components["schemas"]["minimal-repository"]; + head_repository: components["schemas"]["minimal-repository"]; + head_repository_id?: number; + } & { [key: string]: any }; + /** An entry in the reviews log for environment deployments */ + "environment-approvals": { + /** The list of environments that were approved or rejected */ + environments: ({ + /** The id of the environment. */ + id?: number; + node_id?: string; + /** The name of the environment. */ + name?: string; + url?: string; + html_url?: string; + /** The time that the environment was created, in ISO 8601 format. */ + created_at?: string; + /** The time that the environment was last updated, in ISO 8601 format. */ + updated_at?: string; + } & { [key: string]: any })[]; + /** Whether deployment to the environment(s) was approved or rejected */ + state: "approved" | "rejected"; + user: components["schemas"]["simple-user"]; + /** The comment submitted with the deployment review */ + comment: string; + } & { [key: string]: any }; + /** The type of reviewer. Must be one of: `User` or `Team` */ + "deployment-reviewer-type": "User" | "Team"; + /** Details of a deployment that is waiting for protection rules to pass */ + "pending-deployment": { + environment: { + /** The id of the environment. */ + id?: number; + node_id?: string; + /** The name of the environment. */ + name?: string; + url?: string; + html_url?: string; + } & { [key: string]: any }; + /** The set duration of the wait timer */ + wait_timer: number; + /** The time that the wait timer began. */ + wait_timer_started_at: string | null; + /** Whether the currently authenticated user can approve the deployment */ + current_user_can_approve: boolean; + /** 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: ({ + type?: components["schemas"]["deployment-reviewer-type"]; + reviewer?: (Partial & Partial) & { + [key: string]: any; + }; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + /** A request for a specific ref(branch,sha,tag) to be deployed */ + deployment: { + url: string; + /** Unique identifier of the deployment */ + id: number; + node_id: string; + sha: string; + /** The ref to deploy. This can be a branch, tag, or sha. */ + ref: string; + /** Parameter to specify a task to execute */ + task: string; + payload: { [key: string]: any }; + original_environment?: string; + /** Name for the target deployment environment. */ + environment: string; + description: string | null; + creator: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + created_at: string; + updated_at: string; + statuses_url: string; + repository_url: string; + /** Specifies if the given environment is will no longer exist at some point in the future. Default: false. */ + transient_environment?: boolean; + /** Specifies if the given environment is one that end-users directly interact with. Default: false. */ + production_environment?: boolean; + performed_via_github_app?: (components["schemas"]["integration"] & { [key: string]: any }) | null; + } & { [key: string]: any }; + /** Workflow Run Usage */ + "workflow-run-usage": { + billable: { + UBUNTU?: { + total_ms: number; + jobs: number; + } & { [key: string]: any }; + MACOS?: { + total_ms: number; + jobs: number; + } & { [key: string]: any }; + WINDOWS?: { + total_ms: number; + jobs: number; + } & { [key: string]: any }; + } & { [key: string]: any }; + run_duration_ms: number; + } & { [key: string]: any }; + /** Set secrets for GitHub Actions. */ + "actions-secret": { + /** The name of the secret. */ + name: string; + created_at: string; + updated_at: string; + } & { [key: string]: any }; + /** A GitHub Actions workflow */ + workflow: { + id: number; + node_id: string; + name: string; + path: string; + state: "active" | "deleted"; + created_at: string; + updated_at: string; + url: string; + html_url: string; + badge_url: string; + deleted_at?: string; + } & { [key: string]: any }; + /** Workflow Usage */ + "workflow-usage": { + billable: { + UBUNTU?: { + total_ms?: number; + } & { [key: string]: any }; + MACOS?: { + total_ms?: number; + } & { [key: string]: any }; + WINDOWS?: { + total_ms?: number; + } & { [key: string]: any }; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** Protected Branch Admin Enforced */ + "protected-branch-admin-enforced": { + url: string; + enabled: boolean; + } & { [key: string]: any }; + /** Protected Branch Pull Request Review */ + "protected-branch-pull-request-review": { + url?: string; + dismissal_restrictions?: { + /** The list of users with review dismissal access. */ + users?: components["schemas"]["simple-user"][]; + /** The list of teams with review dismissal access. */ + teams?: components["schemas"]["team"][]; + url?: string; + users_url?: string; + teams_url?: string; + } & { [key: string]: any }; + dismiss_stale_reviews: boolean; + require_code_owner_reviews: boolean; + required_approving_review_count?: number; + } & { [key: string]: any }; + /** Branch Restriction Policy */ + "branch-restriction-policy": { + url: string; + users_url: string; + teams_url: string; + apps_url: string; + users: ({ + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + } & { [key: string]: any })[]; + teams: ({ + id?: number; + node_id?: string; + url?: string; + html_url?: string; + name?: string; + slug?: string; + description?: string | null; + privacy?: string; + permission?: string; + members_url?: string; + repositories_url?: string; + parent?: string | null; + } & { [key: string]: any })[]; + apps: ({ + id?: number; + slug?: string; + node_id?: string; + owner?: { + login?: string; + id?: number; + node_id?: string; + url?: string; + repos_url?: string; + events_url?: string; + hooks_url?: string; + issues_url?: string; + members_url?: string; + public_members_url?: string; + avatar_url?: string; + description?: string; + gravatar_id?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + received_events_url?: string; + type?: string; + } & { [key: string]: any }; + name?: string; + description?: string; + external_url?: string; + html_url?: string; + created_at?: string; + updated_at?: string; + permissions?: { + metadata?: string; + contents?: string; + issues?: string; + single_file?: string; + } & { [key: string]: any }; + events?: string[]; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + /** Branch Protection */ + "branch-protection": { + url?: string; + required_status_checks: { + url?: string; + enforcement_level: string; + contexts: string[]; + contexts_url?: string; + } & { [key: string]: any }; + enforce_admins?: components["schemas"]["protected-branch-admin-enforced"]; + required_pull_request_reviews?: components["schemas"]["protected-branch-pull-request-review"]; + restrictions?: components["schemas"]["branch-restriction-policy"]; + required_linear_history?: { + enabled?: boolean; + } & { [key: string]: any }; + allow_force_pushes?: { + enabled?: boolean; + } & { [key: string]: any }; + allow_deletions?: { + enabled?: boolean; + } & { [key: string]: any }; + enabled: boolean; + name?: string; + protection_url?: string; + } & { [key: string]: any }; + /** Short Branch */ + "short-branch": { + name: string; + commit: { + sha: string; + url: string; + } & { [key: string]: any }; + protected: boolean; + protection?: components["schemas"]["branch-protection"]; + protection_url?: string; + } & { [key: string]: any }; + /** Metaproperties for Git author/committer information. */ + "git-user": { + name?: string; + email?: string; + date?: string; + } & { [key: string]: any }; + verification: { + verified: boolean; + reason: string; + payload: string | null; + signature: string | null; + } & { [key: string]: any }; + /** Commit */ + commit: { + url: string; + sha: string; + node_id: string; + html_url: string; + comments_url: string; + commit: { + url: string; + author: (components["schemas"]["git-user"] & { [key: string]: any }) | null; + committer: (components["schemas"]["git-user"] & { [key: string]: any }) | null; + message: string; + comment_count: number; + tree: { + sha: string; + url: string; + } & { [key: string]: any }; + verification?: components["schemas"]["verification"]; + } & { [key: string]: any }; + author: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + committer: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + parents: ({ + sha: string; + url: string; + html_url?: string; + } & { [key: string]: any })[]; + stats?: { + additions?: number; + deletions?: number; + total?: number; + } & { [key: string]: any }; + files?: ({ + filename?: string; + additions?: number; + deletions?: number; + changes?: number; + status?: string; + raw_url?: string; + blob_url?: string; + patch?: string; + sha?: string; + contents_url?: string; + previous_filename?: string; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + /** Branch With Protection */ + "branch-with-protection": { + name: string; + commit: components["schemas"]["commit"]; + _links: { + html: string; + self: string; + } & { [key: string]: any }; + protected: boolean; + protection: components["schemas"]["branch-protection"]; + protection_url: string; + pattern?: string; + required_approving_review_count?: number; + } & { [key: string]: any }; + /** Status Check Policy */ + "status-check-policy": { + url: string; + strict: boolean; + contexts: string[]; + contexts_url: string; + } & { [key: string]: any }; + /** Branch protections protect branches */ + "protected-branch": { + url: string; + required_status_checks?: components["schemas"]["status-check-policy"]; + required_pull_request_reviews?: { + url: string; + dismiss_stale_reviews?: boolean; + require_code_owner_reviews?: boolean; + required_approving_review_count?: number; + dismissal_restrictions?: { + url: string; + users_url: string; + teams_url: string; + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + } & { [key: string]: any }; + } & { [key: string]: any }; + required_signatures?: { + url: string; + enabled: boolean; + } & { [key: string]: any }; + enforce_admins?: { + url: string; + enabled: boolean; + }; + required_linear_history?: { + enabled: boolean; + }; + allow_force_pushes?: { + enabled: boolean; + }; + allow_deletions?: { + enabled: boolean; + }; + restrictions?: components["schemas"]["branch-restriction-policy"]; + } & { [key: string]: any }; + /** A deployment created as the result of an Actions check run from a workflow that references an environment */ + "deployment-simple": { + url: string; + /** Unique identifier of the deployment */ + id: number; + node_id: string; + /** Parameter to specify a task to execute */ + task: string; + original_environment?: string; + /** Name for the target deployment environment. */ + environment: string; + description: string | null; + created_at: string; + updated_at: string; + statuses_url: string; + repository_url: string; + /** Specifies if the given environment is will no longer exist at some point in the future. Default: false. */ + transient_environment?: boolean; + /** Specifies if the given environment is one that end-users directly interact with. Default: false. */ + production_environment?: boolean; + performed_via_github_app?: (components["schemas"]["integration"] & { [key: string]: any }) | null; + } & { [key: string]: any }; + /** A check performed on the code of a given code change */ + "check-run": { + /** The id of the check. */ + id: number; + /** The SHA of the commit that is being checked. */ + head_sha: string; + node_id: string; + external_id: string | null; + url: string; + html_url: string | null; + details_url: string | null; + /** The phase of the lifecycle that the check is currently in. */ + status: "queued" | "in_progress" | "completed"; + conclusion: + | ("success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required") + | null; + started_at: string | null; + completed_at: string | null; + output: { + title: string | null; + summary: string | null; + text: string | null; + annotations_count: number; + annotations_url: string; + } & { [key: string]: any }; + /** The name of the check. */ + name: string; + check_suite: + | ({ + id: number; + } & { [key: string]: any }) + | null; + app: (components["schemas"]["integration"] & { [key: string]: any }) | null; + pull_requests: components["schemas"]["pull-request-minimal"][]; + deployment?: components["schemas"]["deployment-simple"]; + } & { [key: string]: any }; + /** Check Annotation */ + "check-annotation": { + path: string; + start_line: number; + end_line: number; + start_column: number | null; + end_column: number | null; + annotation_level: string | null; + title: string | null; + message: string | null; + raw_details: string | null; + blob_href: string; + } & { [key: string]: any }; + /** A suite of checks performed on the code of a given code change */ + "check-suite": { + id: number; + node_id: string; + head_branch: string | null; + /** The SHA of the head commit that is being checked. */ + head_sha: string; + status: ("queued" | "in_progress" | "completed") | null; + conclusion: + | ("success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required") + | null; + url: string | null; + before: string | null; + after: string | null; + pull_requests: components["schemas"]["pull-request-minimal"][] | null; + app: (components["schemas"]["integration"] & { [key: string]: any }) | null; + repository: components["schemas"]["minimal-repository"]; + created_at: string | null; + updated_at: string | null; + head_commit: components["schemas"]["simple-commit"]; + latest_check_runs_count: number; + check_runs_url: string; + } & { [key: string]: any }; + /** Check suite configuration preferences for a repository. */ + "check-suite-preference": { + preferences: { + auto_trigger_checks?: ({ + app_id: number; + setting: boolean; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + repository: components["schemas"]["repository"]; + } & { [key: string]: any }; + /** The name of the tool used to generate the code scanning analysis. */ + "code-scanning-analysis-tool-name": string; + /** 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; + /** The full Git reference, formatted as `refs/heads/`. */ + "code-scanning-ref": string; + /** State of a code scanning alert. */ + "code-scanning-alert-state": "open" | "dismissed" | "fixed"; + /** The security alert number. */ + "alert-number": number; + /** The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ + "alert-created-at": string; + /** The REST API URL of the alert resource. */ + "alert-url": string; + /** The GitHub URL of the alert resource. */ + "alert-html-url": string; + /** The REST API URL for fetching the list of instances for an alert. */ + "alert-instances-url": string; + /** The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ + "code-scanning-alert-dismissed-at": string | null; + /** **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`. */ + "code-scanning-alert-dismissed-reason": string | null; + "code-scanning-alert-rule-summary": { + /** A unique identifier for the rule used to detect the alert. */ + id?: string | null; + /** The name of the rule used to detect the alert. */ + name?: string; + /** The severity of the alert. */ + severity?: ("none" | "note" | "warning" | "error") | null; + /** A short description of the rule used to detect the alert. */ + description?: string; + } & { [key: string]: any }; + /** The version of the tool used to generate the code scanning analysis. */ + "code-scanning-analysis-tool-version": string | null; + "code-scanning-analysis-tool": { + name?: components["schemas"]["code-scanning-analysis-tool-name"]; + version?: components["schemas"]["code-scanning-analysis-tool-version"]; + guid?: components["schemas"]["code-scanning-analysis-tool-guid"]; + } & { [key: string]: any }; + /** 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; + /** 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; + /** Describe a region within a file for the alert. */ + "code-scanning-alert-location": { + path?: string; + start_line?: number; + end_line?: number; + start_column?: number; + end_column?: number; + } & { [key: string]: any }; + /** A classification of the file. For example to identify it as generated. */ + "code-scanning-alert-classification": ("source" | "generated" | "test" | "library") | null; + "code-scanning-alert-instance": { + ref?: components["schemas"]["code-scanning-ref"]; + analysis_key?: components["schemas"]["code-scanning-analysis-analysis-key"]; + environment?: components["schemas"]["code-scanning-alert-environment"]; + state?: components["schemas"]["code-scanning-alert-state"]; + commit_sha?: string; + message?: { + text?: string; + } & { [key: string]: any }; + location?: components["schemas"]["code-scanning-alert-location"]; + html_url?: string; + /** + * 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"][]; + } & { [key: string]: any }; + "code-scanning-alert-items": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + dismissed_by: components["schemas"]["simple-user"]; + dismissed_at: components["schemas"]["code-scanning-alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + rule: components["schemas"]["code-scanning-alert-rule-summary"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + } & { [key: string]: any }; + "code-scanning-alert-rule": { + /** A unique identifier for the rule used to detect the alert. */ + id?: string | null; + /** The name of the rule used to detect the alert. */ + name?: string; + /** The severity of the alert. */ + severity?: ("none" | "note" | "warning" | "error") | null; + /** A short description of the rule used to detect the alert. */ + description?: string; + /** description of the rule used to detect the alert. */ + full_description?: string; + /** A set of tags applicable for the rule. */ + tags?: string[]; + /** Detailed documentation for the rule as GitHub Flavored Markdown. */ + help?: string; + } & { [key: string]: any }; + "code-scanning-alert": { + number: components["schemas"]["alert-number"]; + created_at: components["schemas"]["alert-created-at"]; + url: components["schemas"]["alert-url"]; + html_url: components["schemas"]["alert-html-url"]; + instances_url: components["schemas"]["alert-instances-url"]; + state: components["schemas"]["code-scanning-alert-state"]; + dismissed_by: components["schemas"]["simple-user"]; + dismissed_at: components["schemas"]["code-scanning-alert-dismissed-at"]; + dismissed_reason: components["schemas"]["code-scanning-alert-dismissed-reason"]; + rule: components["schemas"]["code-scanning-alert-rule"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; + } & { [key: string]: any }; + /** 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`. */ + "code-scanning-alert-set-state": "open" | "dismissed"; + /** An identifier for the upload. */ + "code-scanning-analysis-sarif-id": string; + /** The SHA of the commit to which the analysis you are uploading relates. */ + "code-scanning-analysis-commit-sha": string; + /** Identifies the variable values associated with the environment in which this analysis was performed. */ + "code-scanning-analysis-environment": string; + /** The time that the analysis was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ + "code-scanning-analysis-created-at": string; + /** The REST API URL of the analysis resource. */ + "code-scanning-analysis-url": string; + "code-scanning-analysis": { + ref: components["schemas"]["code-scanning-ref"]; + commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; + analysis_key: components["schemas"]["code-scanning-analysis-analysis-key"]; + environment: components["schemas"]["code-scanning-analysis-environment"]; + error: string; + created_at: components["schemas"]["code-scanning-analysis-created-at"]; + /** The total number of results in the analysis. */ + results_count: number; + /** The total number of rules used in the analysis. */ + rules_count: number; + /** Unique identifier for this analysis. */ + id: number; + url: components["schemas"]["code-scanning-analysis-url"]; + sarif_id: components["schemas"]["code-scanning-analysis-sarif-id"]; + tool: components["schemas"]["code-scanning-analysis-tool"]; + deletable: boolean; + } & { [key: string]: any }; + /** Successful deletion of a code scanning analysis */ + "code-scanning-analysis-deletion": { + /** Next deletable analysis in chain, without last analysis deletion confirmation */ + next_analysis_url: string | null; + /** Next deletable analysis in chain, with last analysis deletion confirmation */ + confirm_delete_url: string | null; + } & { [key: string]: any }; + /** Scim Error */ + "scim-error": { + message?: string | null; + documentation_url?: string | null; + detail?: string | null; + status?: number; + scimType?: string | null; + schemas?: string[]; + } & { [key: string]: any }; + /** 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/github/finding-security-vulnerabilities-and-errors-in-your-code/sarif-support-for-code-scanning)." */ + "code-scanning-analysis-sarif-file": string; + "code-scanning-sarifs-receipt": { + id?: components["schemas"]["code-scanning-analysis-sarif-id"]; + /** The REST API URL for checking the status of the upload. */ + url?: string; + } & { [key: string]: any }; + "code-scanning-sarifs-status": { + /** `pending` files have not yet been processed, while `complete` means all results in the SARIF have been stored. */ + processing_status?: "pending" | "complete"; + /** The REST API URL for getting the analyses associated with the upload. */ + analyses_url?: string | null; + } & { [key: string]: any }; + /** Collaborator */ + collaborator: { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string | null; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + permissions?: { + pull: boolean; + push: boolean; + admin: boolean; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** Repository invitations let you manage who you collaborate with. */ + "repository-invitation": { + /** Unique identifier of the repository invitation. */ + id: number; + repository: components["schemas"]["minimal-repository"]; + invitee: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + inviter: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + /** The permission associated with the invitation. */ + permissions: "read" | "write" | "admin"; + created_at: string; + /** Whether or not the invitation has expired */ + expired?: boolean; + /** URL for the repository invitation */ + url: string; + html_url: string; + node_id: string; + } & { [key: string]: any }; + /** Commit Comment */ + "commit-comment": { + html_url: string; + url: string; + id: number; + node_id: string; + body: string; + path: string | null; + position: number | null; + line: number | null; + commit_id: string; + user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + created_at: string; + updated_at: string; + author_association: components["schemas"]["author_association"]; + reactions?: components["schemas"]["reaction-rollup"]; + } & { [key: string]: any }; + /** Branch Short */ + "branch-short": { + name: string; + commit: { + sha: string; + url: string; + } & { [key: string]: any }; + protected: boolean; + } & { [key: string]: any }; + /** Hypermedia Link */ + link: { + href: string; + } & { [key: string]: any }; + /** The status of auto merging a pull request. */ + auto_merge: + | ({ + enabled_by: components["schemas"]["simple-user"]; + /** The merge method to use. */ + merge_method: "merge" | "squash" | "rebase"; + /** Title for the merge commit message. */ + commit_title: string; + /** Commit message for the merge commit. */ + commit_message: string; + } & { [key: string]: any }) + | null; + /** Pull Request Simple */ + "pull-request-simple": { + url: string; + id: number; + node_id: string; + html_url: string; + diff_url: string; + patch_url: string; + issue_url: string; + commits_url: string; + review_comments_url: string; + review_comment_url: string; + comments_url: string; + statuses_url: string; + number: number; + state: string; + locked: boolean; + title: string; + user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + body: string | null; + labels: ({ + id?: number; + node_id?: string; + url?: string; + name?: string; + description?: string; + color?: string; + default?: boolean; + } & { [key: string]: any })[]; + milestone: (components["schemas"]["milestone"] & { [key: string]: any }) | null; + active_lock_reason?: string | null; + created_at: string; + updated_at: string; + closed_at: string | null; + merged_at: string | null; + merge_commit_sha: string | null; + assignee: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + assignees?: components["schemas"]["simple-user"][] | null; + requested_reviewers?: components["schemas"]["simple-user"][] | null; + requested_teams?: components["schemas"]["team-simple"][] | null; + head: { + label: string; + ref: string; + repo: components["schemas"]["repository"]; + sha: string; + user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + } & { [key: string]: any }; + base: { + label: string; + ref: string; + repo: components["schemas"]["repository"]; + sha: string; + user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + } & { [key: string]: any }; + _links: { + comments: components["schemas"]["link"]; + commits: components["schemas"]["link"]; + statuses: components["schemas"]["link"]; + html: components["schemas"]["link"]; + issue: components["schemas"]["link"]; + review_comments: components["schemas"]["link"]; + review_comment: components["schemas"]["link"]; + self: components["schemas"]["link"]; + } & { [key: string]: any }; + author_association: components["schemas"]["author_association"]; + auto_merge: components["schemas"]["auto_merge"]; + /** Indicates whether or not the pull request is a draft. */ + draft?: boolean; + } & { [key: string]: any }; + "simple-commit-status": { + description: string | null; + id: number; + node_id: string; + state: string; + context: string; + target_url: string; + required?: boolean | null; + avatar_url: string | null; + url: string; + created_at: string; + updated_at: string; + } & { [key: string]: any }; + /** Combined Commit Status */ + "combined-commit-status": { + state: string; + statuses: components["schemas"]["simple-commit-status"][]; + sha: string; + total_count: number; + repository: components["schemas"]["minimal-repository"]; + commit_url: string; + url: string; + } & { [key: string]: any }; + /** The status of a commit. */ + status: { + url: string; + avatar_url: string | null; + id: number; + node_id: string; + state: string; + description: string; + target_url: string; + context: string; + created_at: string; + updated_at: string; + creator: components["schemas"]["simple-user"]; + } & { [key: string]: any }; + "community-health-file": { + url: string; + html_url: string; + } & { [key: string]: any }; + /** Community Profile */ + "community-profile": { + health_percentage: number; + description: string | null; + documentation: string | null; + files: { + code_of_conduct: (components["schemas"]["code-of-conduct-simple"] & { [key: string]: any }) | null; + license: (components["schemas"]["license-simple"] & { [key: string]: any }) | null; + contributing: (components["schemas"]["community-health-file"] & { [key: string]: any }) | null; + readme: (components["schemas"]["community-health-file"] & { [key: string]: any }) | null; + issue_template: (components["schemas"]["community-health-file"] & { [key: string]: any }) | null; + pull_request_template: (components["schemas"]["community-health-file"] & { [key: string]: any }) | null; + } & { [key: string]: any }; + updated_at: string | null; + content_reports_enabled?: boolean; + } & { [key: string]: any }; + /** Diff Entry */ + "diff-entry": { + sha: string; + filename: string; + status: string; + additions: number; + deletions: number; + changes: number; + blob_url: string; + raw_url: string; + contents_url: string; + patch?: string; + previous_filename?: string; + } & { [key: string]: any }; + /** Commit Comparison */ + "commit-comparison": { + url: string; + html_url: string; + permalink_url: string; + diff_url: string; + patch_url: string; + base_commit: components["schemas"]["commit"]; + merge_base_commit: components["schemas"]["commit"]; + status: "diverged" | "ahead" | "behind" | "identical"; + ahead_by: number; + behind_by: number; + total_commits: number; + commits: components["schemas"]["commit"][]; + files: components["schemas"]["diff-entry"][]; + } & { [key: string]: any }; + /** Content Tree */ + "content-tree": { + type: string; + size: number; + name: string; + path: string; + sha: string; + url: string; + git_url: string | null; + html_url: string | null; + download_url: string | null; + entries?: ({ + type: string; + size: number; + name: string; + path: string; + content?: string; + sha: string; + url: string; + git_url: string | null; + html_url: string | null; + download_url: string | null; + _links: { + git: string | null; + html: string | null; + self: string; + } & { [key: string]: any }; + } & { [key: string]: any })[]; + _links: { + git: string | null; + html: string | null; + self: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** A list of directory items */ + "content-directory": ({ + type: string; + size: number; + name: string; + path: string; + content?: string; + sha: string; + url: string; + git_url: string | null; + html_url: string | null; + download_url: string | null; + _links: { + git: string | null; + html: string | null; + self: string; + } & { [key: string]: any }; + } & { [key: string]: any })[]; + /** Content File */ + "content-file": { + type: string; + encoding: string; + size: number; + name: string; + path: string; + content: string; + sha: string; + url: string; + git_url: string | null; + html_url: string | null; + download_url: string | null; + _links: { + git: string | null; + html: string | null; + self: string; + } & { [key: string]: any }; + target?: string; + submodule_git_url?: string; + } & { [key: string]: any }; + /** An object describing a symlink */ + "content-symlink": { + type: string; + target: string; + size: number; + name: string; + path: string; + sha: string; + url: string; + git_url: string | null; + html_url: string | null; + download_url: string | null; + _links: { + git: string | null; + html: string | null; + self: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** An object describing a symlink */ + "content-submodule": { + type: string; + submodule_git_url: string; + size: number; + name: string; + path: string; + sha: string; + url: string; + git_url: string | null; + html_url: string | null; + download_url: string | null; + _links: { + git: string | null; + html: string | null; + self: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** File Commit */ + "file-commit": { + content: + | ({ + name?: string; + path?: string; + sha?: string; + size?: number; + url?: string; + html_url?: string; + git_url?: string; + download_url?: string; + type?: string; + _links?: { + self?: string; + git?: string; + html?: string; + } & { [key: string]: any }; + } & { [key: string]: any }) + | null; + commit: { + sha?: string; + node_id?: string; + url?: string; + html_url?: string; + author?: { + date?: string; + name?: string; + email?: string; + } & { [key: string]: any }; + committer?: { + date?: string; + name?: string; + email?: string; + } & { [key: string]: any }; + message?: string; + tree?: { + url?: string; + sha?: string; + } & { [key: string]: any }; + parents?: ({ + url?: string; + html_url?: string; + sha?: string; + } & { [key: string]: any })[]; + verification?: { + verified?: boolean; + reason?: string; + signature?: string | null; + payload?: string | null; + } & { [key: string]: any }; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** Contributor */ + contributor: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string | null; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type: string; + site_admin?: boolean; + contributions: number; + email?: string; + name?: string; + } & { [key: string]: any }; + /** The status of a deployment. */ + "deployment-status": { + url: string; + id: number; + node_id: string; + /** The state of the status. */ + state: "error" | "failure" | "inactive" | "pending" | "success" | "queued" | "in_progress"; + creator: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + /** A short description of the status. */ + description: string; + /** The environment of the deployment that the status is for. */ + environment?: string; + /** Deprecated: the URL to associate with this status. */ + target_url: string; + created_at: string; + updated_at: string; + deployment_url: string; + repository_url: string; + /** The URL for accessing your environment. */ + environment_url?: string; + /** The URL to associate with this status. */ + log_url?: string; + performed_via_github_app?: (components["schemas"]["integration"] & { [key: string]: any }) | null; + } & { [key: string]: any }; + /** 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). */ + "wait-timer": number; + /** The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. */ + deployment_branch_policy: + | ({ + /** 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; + /** 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; + } & { [key: string]: any }) + | null; + /** Details of a deployment environment */ + environment: { + /** The id of the environment. */ + id: number; + node_id: string; + /** The name of the environment. */ + name: string; + url: string; + html_url: string; + /** The time that the environment was created, in ISO 8601 format. */ + created_at: string; + /** The time that the environment was last updated, in ISO 8601 format. */ + updated_at: string; + protection_rules?: ((Partial< + { + id: number; + node_id: string; + type: string; + wait_timer?: components["schemas"]["wait-timer"]; + } & { [key: string]: any } + > & + Partial< + { + id: number; + node_id: string; + type: string; + /** 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?: ({ + type?: components["schemas"]["deployment-reviewer-type"]; + reviewer?: (Partial & + Partial) & { [key: string]: any }; + } & { [key: string]: any })[]; + } & { [key: string]: any } + > & + Partial< + { + id: number; + node_id: string; + type: string; + } & { [key: string]: any } + >) & { [key: string]: any })[]; + deployment_branch_policy?: components["schemas"]["deployment_branch_policy"]; + } & { [key: string]: any }; + /** Short Blob */ + "short-blob": { + url: string; + sha: string; + } & { [key: string]: any }; + /** Blob */ + blob: { + content: string; + encoding: string; + url: string; + sha: string; + size: number | null; + node_id: string; + highlighted_content?: string; + } & { [key: string]: any }; + /** Low-level Git commit operations within a repository */ + "git-commit": { + /** SHA for the commit */ + sha: string; + node_id: string; + url: string; + /** Identifying information for the git-user */ + author: { + /** Timestamp of the commit */ + date: string; + /** Git email address of the user */ + email: string; + /** Name of the git user */ + name: string; + } & { [key: string]: any }; + /** Identifying information for the git-user */ + committer: { + /** Timestamp of the commit */ + date: string; + /** Git email address of the user */ + email: string; + /** Name of the git user */ + name: string; + } & { [key: string]: any }; + /** Message describing the purpose of the commit */ + message: string; + tree: { + /** SHA for the commit */ + sha: string; + url: string; + } & { [key: string]: any }; + parents: ({ + /** SHA for the commit */ + sha: string; + url: string; + html_url: string; + } & { [key: string]: any })[]; + verification: { + verified: boolean; + reason: string; + signature: string | null; + payload: string | null; + } & { [key: string]: any }; + html_url: string; + } & { [key: string]: any }; + /** Git references within a repository */ + "git-ref": { + ref: string; + node_id: string; + url: string; + object: { + type: string; + /** SHA for the reference */ + sha: string; + url: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** Metadata for a Git tag */ + "git-tag": { + node_id: string; + /** Name of the tag */ + tag: string; + sha: string; + /** URL for the tag */ + url: string; + /** Message describing the purpose of the tag */ + message: string; + tagger: { + date: string; + email: string; + name: string; + } & { [key: string]: any }; + object: { + sha: string; + type: string; + url: string; + } & { [key: string]: any }; + verification?: components["schemas"]["verification"]; + } & { [key: string]: any }; + /** The hierarchy between files in a Git repository. */ + "git-tree": { + sha: string; + url: string; + truncated: boolean; + /** Objects specifying a tree structure */ + tree: ({ + path?: string; + mode?: string; + type?: string; + sha?: string; + size?: number; + url?: string; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + "hook-response": { + code: number | null; + status: string | null; + message: string | null; + } & { [key: string]: any }; + /** Webhooks for repositories. */ + hook: { + type: string; + /** Unique identifier of the webhook. */ + id: number; + /** The name of a valid service, use 'web' for a webhook. */ + name: string; + /** Determines whether the hook is actually triggered on pushes. */ + active: boolean; + /** Determines what events the hook is triggered for. Default: ['push']. */ + events: string[]; + config: { + email?: string; + password?: string; + room?: string; + subdomain?: string; + url?: components["schemas"]["webhook-config-url"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + digest?: string; + secret?: components["schemas"]["webhook-config-secret"]; + token?: string; + } & { [key: string]: any }; + updated_at: string; + created_at: string; + url: string; + test_url: string; + ping_url: string; + last_response: components["schemas"]["hook-response"]; + } & { [key: string]: any }; + /** A repository import from an external source. */ + import: { + vcs: string | null; + use_lfs?: string; + /** The URL of the originating repository. */ + vcs_url: string; + svc_root?: string; + tfvc_project?: 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; + failed_step?: string | null; + error_message?: string | null; + import_percent?: number | null; + commit_count?: number | null; + push_percent?: number | null; + has_large_files?: boolean; + large_files_size?: number; + large_files_count?: number; + project_choices?: ({ + vcs?: string; + tfvc_project?: string; + human_name?: string; + } & { [key: string]: any })[]; + message?: string; + authors_count?: number | null; + url: string; + html_url: string; + authors_url: string; + repository_url: string; + svn_root?: string; + } & { [key: string]: any }; + /** Porter Author */ + "porter-author": { + id: number; + remote_id: string; + remote_name: string; + email: string; + name: string; + url: string; + import_url: string; + } & { [key: string]: any }; + /** Porter Large File */ + "porter-large-file": { + ref_name: string; + path: string; + oid: string; + size: number; + } & { [key: string]: any }; + /** Issue Event Label */ + "issue-event-label": { + name: string | null; + color: string | null; + } & { [key: string]: any }; + "issue-event-dismissed-review": { + state: string; + review_id: number; + dismissal_message: string | null; + dismissal_commit_id?: string | null; + } & { [key: string]: any }; + /** Issue Event Milestone */ + "issue-event-milestone": { + title: string; + } & { [key: string]: any }; + /** Issue Event Project Card */ + "issue-event-project-card": { + url: string; + id: number; + project_url: string; + project_id: number; + column_name: string; + previous_column_name?: string; + } & { [key: string]: any }; + /** Issue Event Rename */ + "issue-event-rename": { + from: string; + to: string; + } & { [key: string]: any }; + /** Issue Event */ + "issue-event": { + id: number; + node_id: string; + url: string; + actor: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + issue?: components["schemas"]["issue-simple"]; + label?: components["schemas"]["issue-event-label"]; + assignee?: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + assigner?: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + review_requester?: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + requested_reviewer?: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + requested_team?: components["schemas"]["team"]; + dismissed_review?: components["schemas"]["issue-event-dismissed-review"]; + milestone?: components["schemas"]["issue-event-milestone"]; + project_card?: components["schemas"]["issue-event-project-card"]; + rename?: components["schemas"]["issue-event-rename"]; + author_association?: components["schemas"]["author_association"]; + lock_reason?: string | null; + } & { [key: string]: any }; + /** Issue Event for Issue */ + "issue-event-for-issue": { + id?: number; + node_id?: string; + url?: string; + actor?: components["schemas"]["simple-user"]; + event?: string; + commit_id?: string | null; + commit_url?: string | null; + created_at?: string; + sha?: string; + html_url?: string; + message?: string; + issue_url?: string; + updated_at?: string; + author_association?: components["schemas"]["author_association"]; + body?: string; + lock_reason?: string; + submitted_at?: string; + state?: string; + pull_request_url?: string; + body_html?: string; + body_text?: string; + } & { [key: string]: any }; + /** An SSH key granting access to a single repository. */ + "deploy-key": { + id: number; + key: string; + url: string; + title: string; + verified: boolean; + created_at: string; + read_only: boolean; + } & { [key: string]: any }; + /** Language */ + language: { [key: string]: number }; + /** License Content */ + "license-content": { + name: string; + path: string; + sha: string; + size: number; + url: string; + html_url: string | null; + git_url: string | null; + download_url: string | null; + type: string; + content: string; + encoding: string; + _links: { + git: string | null; + html: string | null; + self: string; + } & { [key: string]: any }; + license: (components["schemas"]["license-simple"] & { [key: string]: any }) | null; + } & { [key: string]: any }; + "pages-source-hash": { + branch: string; + path: string; + } & { [key: string]: any }; + /** The configuration for GitHub Pages for a repository. */ + page: { + /** The API address for accessing this Page resource. */ + url: string; + /** The status of the most recent build of the Page. */ + status: ("built" | "building" | "errored") | null; + /** The Pages site's custom domain */ + cname: string | null; + /** Whether the Page has a custom 404 page. */ + custom_404: boolean; + /** The web address the Page can be accessed from. */ + html_url?: string; + source?: components["schemas"]["pages-source-hash"]; + /** 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. */ + public: boolean; + } & { [key: string]: any }; + /** Page Build */ + "page-build": { + url: string; + status: string; + error: { + message: string | null; + } & { [key: string]: any }; + pusher: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + commit: string; + duration: number; + created_at: string; + updated_at: string; + } & { [key: string]: any }; + /** Page Build Status */ + "page-build-status": { + url: string; + status: string; + } & { [key: string]: any }; + /** 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": { + url: string; + id: number; + node_id: string; + html_url: string; + diff_url: string; + patch_url: string; + issue_url: string; + commits_url: string; + review_comments_url: string; + review_comment_url: string; + comments_url: string; + statuses_url: string; + /** Number uniquely identifying the pull request within its repository. */ + number: number; + /** State of this Pull Request. Either `open` or `closed`. */ + state: "open" | "closed"; + locked: boolean; + /** The title of the pull request. */ + title: string; + user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + body: string | null; + labels: ({ + id?: number; + node_id?: string; + url?: string; + name?: string; + description?: string | null; + color?: string; + default?: boolean; + } & { [key: string]: any })[]; + milestone: (components["schemas"]["milestone"] & { [key: string]: any }) | null; + active_lock_reason?: string | null; + created_at: string; + updated_at: string; + closed_at: string | null; + merged_at: string | null; + merge_commit_sha: string | null; + assignee: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + assignees?: components["schemas"]["simple-user"][] | null; + requested_reviewers?: components["schemas"]["simple-user"][] | null; + requested_teams?: components["schemas"]["team-simple"][] | null; + head: { + label: string; + ref: string; + repo: { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string | null; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + hooks_url: string; + html_url: string; + id: number; + node_id: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + notifications_url: string; + owner: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + html_url: string; + id: number; + node_id: string; + login: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + } & { [key: string]: any }; + private: boolean; + pulls_url: string; + releases_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + url: string; + clone_url: string; + default_branch: string; + forks: number; + forks_count: number; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + homepage: string | null; + language: string | null; + master_branch?: string; + archived: boolean; + disabled: boolean; + mirror_url: string | null; + open_issues: number; + open_issues_count: number; + permissions?: { + admin: boolean; + pull: boolean; + push: boolean; + } & { [key: string]: any }; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + license: + | ({ + key: string; + name: string; + url: string | null; + spdx_id: string | null; + node_id: string; + } & { [key: string]: any }) + | null; + pushed_at: string; + size: number; + ssh_url: string; + stargazers_count: number; + svn_url: string; + topics?: string[]; + watchers: number; + watchers_count: number; + created_at: string; + updated_at: string; + } & { [key: string]: any }; + sha: string; + user: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + html_url: string; + id: number; + node_id: string; + login: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + base: { + label: string; + ref: string; + repo: { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string | null; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + hooks_url: string; + html_url: string; + id: number; + node_id: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + notifications_url: string; + owner: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + html_url: string; + id: number; + node_id: string; + login: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + } & { [key: string]: any }; + private: boolean; + pulls_url: string; + releases_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + url: string; + clone_url: string; + default_branch: string; + forks: number; + forks_count: number; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + homepage: string | null; + language: string | null; + master_branch?: string; + archived: boolean; + disabled: boolean; + mirror_url: string | null; + open_issues: number; + open_issues_count: number; + permissions?: { + admin: boolean; + pull: boolean; + push: boolean; + } & { [key: string]: any }; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + license: (components["schemas"]["license-simple"] & { [key: string]: any }) | null; + pushed_at: string; + size: number; + ssh_url: string; + stargazers_count: number; + svn_url: string; + topics?: string[]; + watchers: number; + watchers_count: number; + created_at: string; + updated_at: string; + } & { [key: string]: any }; + sha: string; + user: { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + html_url: string; + id: number; + node_id: string; + login: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + _links: { + comments: components["schemas"]["link"]; + commits: components["schemas"]["link"]; + statuses: components["schemas"]["link"]; + html: components["schemas"]["link"]; + issue: components["schemas"]["link"]; + review_comments: components["schemas"]["link"]; + review_comment: components["schemas"]["link"]; + self: components["schemas"]["link"]; + } & { [key: string]: any }; + author_association: components["schemas"]["author_association"]; + auto_merge: components["schemas"]["auto_merge"]; + /** Indicates whether or not the pull request is a draft. */ + draft?: boolean; + merged: boolean; + mergeable: boolean | null; + rebaseable?: boolean | null; + mergeable_state: string; + merged_by: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + comments: number; + review_comments: number; + /** Indicates whether maintainers can modify the pull request. */ + maintainer_can_modify: boolean; + commits: number; + additions: number; + deletions: number; + changed_files: number; + } & { [key: string]: any }; + /** Pull Request Review Comments are comments on a portion of the Pull Request's diff. */ + "pull-request-review-comment": { + /** URL for the pull request review comment */ + url: string; + /** The ID of the pull request review to which the comment belongs. */ + pull_request_review_id: number | null; + /** The ID of the pull request review comment. */ + id: number; + /** The node ID of the pull request review comment. */ + node_id: string; + /** The diff of the line that the comment refers to. */ + diff_hunk: string; + /** The relative path of the file to which the comment applies. */ + path: string; + /** The line index in the diff to which the comment applies. */ + position: number; + /** The index of the original line in the diff to which the comment applies. */ + original_position: number; + /** The SHA of the commit to which the comment applies. */ + commit_id: string; + /** The SHA of the original commit to which the comment applies. */ + original_commit_id: string; + /** The comment ID to reply to. */ + in_reply_to_id?: number; + user: components["schemas"]["simple-user"]; + /** The text of the comment. */ + body: string; + created_at: string; + updated_at: string; + /** HTML URL for the pull request review comment. */ + html_url: string; + /** URL for the pull request that the review comment belongs to. */ + pull_request_url: string; + author_association: components["schemas"]["author_association"]; + _links: { + self: { + href: string; + } & { [key: string]: any }; + html: { + href: string; + } & { [key: string]: any }; + pull_request: { + href: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** The first line of the range for a multi-line comment. */ + start_line?: number | null; + /** The first line of the range for a multi-line comment. */ + original_start_line?: number | null; + /** The side of the first line of the range for a multi-line comment. */ + start_side?: ("LEFT" | "RIGHT") | null; + /** The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line?: number; + /** The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line?: number; + /** The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment */ + side?: "LEFT" | "RIGHT"; + reactions?: components["schemas"]["reaction-rollup"]; + body_html?: string; + body_text?: string; + } & { [key: string]: any }; + /** Pull Request Merge Result */ + "pull-request-merge-result": { + sha: string; + merged: boolean; + message: string; + } & { [key: string]: any }; + /** Pull Request Review Request */ + "pull-request-review-request": { + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team-simple"][]; + } & { [key: string]: any }; + /** Pull Request Reviews are reviews on pull requests. */ + "pull-request-review": { + /** Unique identifier of the review */ + id: number; + node_id: string; + user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + /** The text of the review. */ + body: string; + state: string; + html_url: string; + pull_request_url: string; + _links: { + html: { + href: string; + } & { [key: string]: any }; + pull_request: { + href: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + submitted_at?: string; + /** A commit SHA for the review. */ + commit_id: string; + body_html?: string; + body_text?: string; + author_association: components["schemas"]["author_association"]; + } & { [key: string]: any }; + /** Legacy Review Comment */ + "review-comment": { + url: string; + pull_request_review_id: number | null; + id: number; + node_id: string; + diff_hunk: string; + path: string; + position: number | null; + original_position: number; + commit_id: string; + original_commit_id: string; + in_reply_to_id?: number; + user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + body: string; + created_at: string; + updated_at: string; + html_url: string; + pull_request_url: string; + author_association: components["schemas"]["author_association"]; + _links: { + self: components["schemas"]["link"]; + html: components["schemas"]["link"]; + pull_request: components["schemas"]["link"]; + } & { [key: string]: any }; + body_text?: string; + body_html?: string; + /** The side of the first line of the range for a multi-line comment. */ + side?: "LEFT" | "RIGHT"; + /** The side of the first line of the range for a multi-line comment. */ + start_side?: ("LEFT" | "RIGHT") | null; + /** The line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + line?: number; + /** The original line of the blob to which the comment applies. The last line of the range for a multi-line comment */ + original_line?: number; + /** The first line of the range for a multi-line comment. */ + start_line?: number | null; + /** The original first line of the range for a multi-line comment. */ + original_start_line?: number | null; + } & { [key: string]: any }; + /** Data related to a release. */ + "release-asset": { + url: string; + browser_download_url: string; + id: number; + node_id: string; + /** The file name of the asset. */ + name: string; + label: string | null; + /** State of the release asset. */ + state: "uploaded" | "open"; + content_type: string; + size: number; + download_count: number; + created_at: string; + updated_at: string; + uploader: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + } & { [key: string]: any }; + /** A release. */ + release: { + url: string; + html_url: string; + assets_url: string; + upload_url: string; + tarball_url: string | null; + zipball_url: string | null; + id: number; + node_id: string; + /** The name of the tag. */ + tag_name: string; + /** Specifies the commitish value that determines where the Git tag is created from. */ + target_commitish: string; + name: string | null; + body?: string | null; + /** true to create a draft (unpublished) release, false to create a published one. */ + draft: boolean; + /** Whether to identify the release as a prerelease or a full release. */ + prerelease: boolean; + created_at: string; + published_at: string | null; + author: components["schemas"]["simple-user"]; + assets: components["schemas"]["release-asset"][]; + body_html?: string; + body_text?: string; + } & { [key: string]: any }; + /** 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`. */ + "secret-scanning-alert-state": "open" | "resolved"; + /** **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`. */ + "secret-scanning-alert-resolution": string | null; + "secret-scanning-alert": { + number?: components["schemas"]["alert-number"]; + created_at?: components["schemas"]["alert-created-at"]; + url?: components["schemas"]["alert-url"]; + html_url?: components["schemas"]["alert-html-url"]; + state?: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + /** The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["simple-user"]; + /** The type of secret that secret scanning detected. */ + secret_type?: string; + /** The secret that was detected. */ + secret?: string; + } & { [key: string]: any }; + /** Stargazer */ + stargazer: { + starred_at: string; + user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + } & { [key: string]: any }; + /** Code Frequency Stat */ + "code-frequency-stat": number[]; + /** Commit Activity */ + "commit-activity": { + days: number[]; + total: number; + week: number; + } & { [key: string]: any }; + /** Contributor Activity */ + "contributor-activity": { + author: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + total: number; + weeks: ({ + w?: string; + a?: number; + d?: number; + c?: number; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + "participation-stats": { + all: number[]; + owner: number[]; + } & { [key: string]: any }; + /** Repository invitations let you manage who you collaborate with. */ + "repository-subscription": { + /** Determines if notifications should be received from this repository. */ + subscribed: boolean; + /** Determines if all notifications should be blocked from this repository. */ + ignored: boolean; + reason: string | null; + created_at: string; + url: string; + repository_url: string; + } & { [key: string]: any }; + /** Tag */ + tag: { + name: string; + commit: { + sha: string; + url: string; + } & { [key: string]: any }; + zipball_url: string; + tarball_url: string; + node_id: string; + } & { [key: string]: any }; + /** A topic aggregates entities that are related to a subject. */ + topic: { + names: string[]; + } & { [key: string]: any }; + traffic: { + timestamp: string; + uniques: number; + count: number; + } & { [key: string]: any }; + /** Clone Traffic */ + "clone-traffic": { + count: number; + uniques: number; + clones: components["schemas"]["traffic"][]; + } & { [key: string]: any }; + /** Content Traffic */ + "content-traffic": { + path: string; + title: string; + count: number; + uniques: number; + } & { [key: string]: any }; + /** Referrer Traffic */ + "referrer-traffic": { + referrer: string; + count: number; + uniques: number; + } & { [key: string]: any }; + /** View Traffic */ + "view-traffic": { + count: number; + uniques: number; + views: components["schemas"]["traffic"][]; + } & { [key: string]: any }; + "scim-group-list-enterprise": { + schemas: string[]; + totalResults: number; + itemsPerPage: number; + startIndex: number; + Resources: ({ + schemas: string[]; + id: string; + externalId?: string | null; + displayName?: string; + members?: ({ + value?: string; + $ref?: string; + display?: string; + } & { [key: string]: any })[]; + meta?: { + resourceType?: string; + created?: string; + lastModified?: string; + location?: string; + } & { [key: string]: any }; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + "scim-enterprise-group": { + schemas: string[]; + id: string; + externalId?: string | null; + displayName?: string; + members?: ({ + value?: string; + $ref?: string; + display?: string; + } & { [key: string]: any })[]; + meta?: { + resourceType?: string; + created?: string; + lastModified?: string; + location?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + "scim-user-list-enterprise": { + schemas: string[]; + totalResults: number; + itemsPerPage: number; + startIndex: number; + Resources: ({ + schemas: string[]; + id: string; + externalId?: string; + userName?: string; + name?: { + givenName?: string; + familyName?: string; + } & { [key: string]: any }; + emails?: ({ + value?: string; + primary?: boolean; + type?: string; + } & { [key: string]: any })[]; + groups?: ({ + value?: string; + } & { [key: string]: any })[]; + active?: boolean; + meta?: { + resourceType?: string; + created?: string; + lastModified?: string; + location?: string; + } & { [key: string]: any }; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + "scim-enterprise-user": { + schemas: string[]; + id: string; + externalId?: string; + userName?: string; + name?: { + givenName?: string; + familyName?: string; + } & { [key: string]: any }; + emails?: ({ + value?: string; + type?: string; + primary?: boolean; + } & { [key: string]: any })[]; + groups?: ({ + value?: string; + } & { [key: string]: any })[]; + active?: boolean; + meta?: { + resourceType?: string; + created?: string; + lastModified?: string; + location?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** SCIM /Users provisioning endpoints */ + "scim-user": { + /** SCIM schema used. */ + schemas: string[]; + /** Unique identifier of an external identity */ + id: string; + /** The ID of the User. */ + externalId: string | null; + /** Configured by the admin. Could be an email, login, or username */ + userName: string | null; + /** The name of the user, suitable for display to end-users */ + displayName?: string | null; + name: { + givenName: string | null; + familyName: string | null; + formatted?: string | null; + } & { [key: string]: any }; + /** user emails */ + emails: ({ + value: string; + primary?: boolean; + } & { [key: string]: any })[]; + /** The active status of the User. */ + active: boolean; + meta: { + resourceType?: string; + created?: string; + lastModified?: string; + location?: string; + } & { [key: string]: any }; + /** The ID of the organization. */ + organization_id?: number; + /** Set of operations to be performed */ + operations?: ({ + op: "add" | "remove" | "replace"; + path?: string; + value?: (string | { [key: string]: any } | { [key: string]: any }[]) & { [key: string]: any }; + } & { [key: string]: any })[]; + /** associated groups */ + groups?: ({ + value?: string; + display?: string; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + /** SCIM User List */ + "scim-user-list": { + /** SCIM schema used. */ + schemas: string[]; + totalResults: number; + itemsPerPage: number; + startIndex: number; + Resources: components["schemas"]["scim-user"][]; + } & { [key: string]: any }; + "search-result-text-matches": ({ + object_url?: string; + object_type?: string | null; + property?: string; + fragment?: string; + matches?: ({ + text?: string; + indices?: number[]; + } & { [key: string]: any })[]; + } & { [key: string]: any })[]; + /** Code Search Result Item */ + "code-search-result-item": { + name: string; + path: string; + sha: string; + url: string; + git_url: string; + html_url: string; + repository: components["schemas"]["minimal-repository"]; + score: number; + file_size?: number; + language?: string | null; + last_modified_at?: string; + line_numbers?: string[]; + text_matches?: components["schemas"]["search-result-text-matches"]; + } & { [key: string]: any }; + /** Commit Search Result Item */ + "commit-search-result-item": { + url: string; + sha: string; + html_url: string; + comments_url: string; + commit: { + author: { + name: string; + email: string; + date: string; + } & { [key: string]: any }; + committer: (components["schemas"]["git-user"] & { [key: string]: any }) | null; + comment_count: number; + message: string; + tree: { + sha: string; + url: string; + } & { [key: string]: any }; + url: string; + verification?: components["schemas"]["verification"]; + } & { [key: string]: any }; + author: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + committer: (components["schemas"]["git-user"] & { [key: string]: any }) | null; + parents: ({ + url?: string; + html_url?: string; + sha?: string; + } & { [key: string]: any })[]; + repository: components["schemas"]["minimal-repository"]; + score: number; + node_id: string; + text_matches?: components["schemas"]["search-result-text-matches"]; + } & { [key: string]: any }; + /** Issue Search Result Item */ + "issue-search-result-item": { + url: string; + repository_url: string; + labels_url: string; + comments_url: string; + events_url: string; + html_url: string; + id: number; + node_id: string; + number: number; + title: string; + locked: boolean; + active_lock_reason?: string | null; + assignees?: components["schemas"]["simple-user"][] | null; + user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + labels: ({ + id?: number; + node_id?: string; + url?: string; + name?: string; + color?: string; + default?: boolean; + description?: string | null; + } & { [key: string]: any })[]; + state: string; + assignee: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + milestone: (components["schemas"]["milestone"] & { [key: string]: any }) | null; + comments: number; + created_at: string; + updated_at: string; + closed_at: string | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + pull_request?: { + merged_at?: string | null; + diff_url: string | null; + html_url: string | null; + patch_url: string | null; + url: string | null; + } & { [key: string]: any }; + body?: string; + score: number; + author_association: components["schemas"]["author_association"]; + draft?: boolean; + repository?: components["schemas"]["repository"]; + body_html?: string; + body_text?: string; + timeline_url?: string; + performed_via_github_app?: (components["schemas"]["integration"] & { [key: string]: any }) | null; + } & { [key: string]: any }; + /** Label Search Result Item */ + "label-search-result-item": { + id: number; + node_id: string; + url: string; + name: string; + color: string; + default: boolean; + description: string | null; + score: number; + text_matches?: components["schemas"]["search-result-text-matches"]; + } & { [key: string]: any }; + /** Repo Search Result Item */ + "repo-search-result-item": { + id: number; + node_id: string; + name: string; + full_name: string; + owner: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + private: boolean; + html_url: string; + description: string | null; + fork: boolean; + url: string; + created_at: string; + updated_at: string; + pushed_at: string; + homepage: string | null; + size: number; + stargazers_count: number; + watchers_count: number; + language: string | null; + forks_count: number; + open_issues_count: number; + master_branch?: string; + default_branch: string; + score: number; + forks_url: string; + keys_url: string; + collaborators_url: string; + teams_url: string; + hooks_url: string; + issue_events_url: string; + events_url: string; + assignees_url: string; + branches_url: string; + tags_url: string; + blobs_url: string; + git_tags_url: string; + git_refs_url: string; + trees_url: string; + statuses_url: string; + languages_url: string; + stargazers_url: string; + contributors_url: string; + subscribers_url: string; + subscription_url: string; + commits_url: string; + git_commits_url: string; + comments_url: string; + issue_comment_url: string; + contents_url: string; + compare_url: string; + merges_url: string; + archive_url: string; + downloads_url: string; + issues_url: string; + pulls_url: string; + milestones_url: string; + notifications_url: string; + labels_url: string; + releases_url: string; + deployments_url: string; + git_url: string; + ssh_url: string; + clone_url: string; + svn_url: string; + forks: number; + open_issues: number; + watchers: number; + topics?: string[]; + mirror_url: string | null; + has_issues: boolean; + has_projects: boolean; + has_pages: boolean; + has_wiki: boolean; + has_downloads: boolean; + archived: boolean; + /** Returns whether or not this repository disabled. */ + disabled: boolean; + license: (components["schemas"]["license-simple"] & { [key: string]: any }) | null; + permissions?: { + admin: boolean; + pull: boolean; + push: boolean; + } & { [key: string]: any }; + text_matches?: components["schemas"]["search-result-text-matches"]; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + delete_branch_on_merge?: boolean; + } & { [key: string]: any }; + /** Topic Search Result Item */ + "topic-search-result-item": { + name: string; + display_name: string | null; + short_description: string | null; + description: string | null; + created_by: string | null; + released: string | null; + created_at: string; + updated_at: string; + featured: boolean; + curated: boolean; + score: number; + repository_count?: number | null; + logo_url?: string | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + related?: + | ({ + topic_relation?: { + id?: number; + name?: string; + topic_id?: number; + relation_type?: string; + } & { [key: string]: any }; + } & { [key: string]: any })[] + | null; + aliases?: + | ({ + topic_relation?: { + id?: number; + name?: string; + topic_id?: number; + relation_type?: string; + } & { [key: string]: any }; + } & { [key: string]: any })[] + | null; + } & { [key: string]: any }; + /** User Search Result Item */ + "user-search-result-item": { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string | null; + url: string; + html_url: string; + followers_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + received_events_url: string; + type: string; + score: number; + following_url: string; + gists_url: string; + starred_url: string; + events_url: string; + public_repos?: number; + public_gists?: number; + followers?: number; + following?: number; + created_at?: string; + updated_at?: string; + name?: string | null; + bio?: string | null; + email?: string | null; + location?: string | null; + site_admin: boolean; + hireable?: boolean | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + blog?: string | null; + company?: string | null; + suspended_at?: string | null; + } & { [key: string]: any }; + /** Private User */ + "private-user": { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string | null; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + name: string | null; + company: string | null; + blog: string | null; + location: string | null; + email: string | null; + hireable: boolean | null; + bio: string | null; + twitter_username?: string | null; + public_repos: number; + public_gists: number; + followers: number; + following: number; + created_at: string; + updated_at: string; + private_gists: number; + total_private_repos: number; + owned_private_repos: number; + disk_usage: number; + collaborators: number; + two_factor_authentication: boolean; + plan?: { + collaborators: number; + name: string; + space: number; + private_repos: number; + } & { [key: string]: any }; + suspended_at?: string | null; + business_plus?: boolean; + ldap_dn?: string; + } & { [key: string]: any }; + /** Public User */ + "public-user": { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string | null; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + name: string | null; + company: string | null; + blog: string | null; + location: string | null; + email: string | null; + hireable: boolean | null; + bio: string | null; + twitter_username?: string | null; + public_repos: number; + public_gists: number; + followers: number; + following: number; + created_at: string; + updated_at: string; + plan?: { + collaborators: number; + name: string; + space: number; + private_repos: number; + } & { [key: string]: any }; + suspended_at?: string | null; + private_gists?: number; + total_private_repos?: number; + owned_private_repos?: number; + disk_usage?: number; + collaborators?: number; + }; + /** Email */ + email: { + email: string; + primary: boolean; + verified: boolean; + visibility: string | null; + } & { [key: string]: any }; + /** A unique encryption key */ + "gpg-key": { + id: number; + primary_key_id: number | null; + key_id: string; + public_key: string; + emails: ({ + email?: string; + verified?: boolean; + } & { [key: string]: any })[]; + subkeys: ({ + id?: number; + primary_key_id?: number; + key_id?: string; + public_key?: string; + emails?: { [key: string]: any }[]; + subkeys?: { [key: string]: any }[]; + can_sign?: boolean; + can_encrypt_comms?: boolean; + can_encrypt_storage?: boolean; + can_certify?: boolean; + created_at?: string; + expires_at?: string | null; + raw_key?: string | null; + } & { [key: string]: any })[]; + can_sign: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_certify: boolean; + created_at: string; + expires_at: string | null; + raw_key: string | null; + } & { [key: string]: any }; + /** Key */ + key: { + key_id: string; + key: string; + id: number; + url: string; + title: string; + created_at: string; + verified: boolean; + read_only: boolean; + } & { [key: string]: any }; + "marketplace-account": { + url: string; + id: number; + type: string; + node_id?: string; + login: string; + email?: string | null; + organization_billing_email?: string | null; + } & { [key: string]: any }; + /** User Marketplace Purchase */ + "user-marketplace-purchase": { + billing_cycle: string; + next_billing_date: string | null; + unit_count: number | null; + on_free_trial: boolean; + free_trial_ends_on: string | null; + updated_at: string | null; + account: components["schemas"]["marketplace-account"]; + plan: components["schemas"]["marketplace-listing-plan"]; + } & { [key: string]: any }; + /** Starred Repository */ + "starred-repository": { + starred_at: string; + repo: components["schemas"]["repository"]; + } & { [key: string]: any }; + /** Hovercard */ + hovercard: { + contexts: ({ + message: string; + octicon: string; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + /** Key Simple */ + "key-simple": { + id: number; + key: string; + } & { [key: string]: any }; + }; + responses: { + /** Resource Not Found */ + not_found: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Validation Failed */ + validation_failed_simple: { + content: { + "application/json": components["schemas"]["validation-error-simple"]; + }; + }; + /** Preview Header Missing */ + preview_header_missing: { + content: { + "application/json": { + message: string; + documentation_url: string; + } & { [key: string]: any }; + }; + }; + /** Forbidden */ + forbidden: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Requires Authentication */ + requires_authentication: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Validation Failed */ + validation_failed: { + content: { + "application/json": components["schemas"]["validation-error"]; + }; + }; + /** Not Modified */ + not_modified: unknown; + /** Gone */ + gone: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Service Unavailable */ + service_unavailable: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + } & { [key: string]: any }; + }; + }; + /** Forbidden Gist */ + forbidden_gist: { + content: { + "application/json": { + block?: { + reason?: string; + created_at?: string; + html_url?: string | null; + } & { [key: string]: any }; + message?: string; + documentation_url?: string; + } & { [key: string]: any }; + }; + }; + /** Moved Permanently */ + moved_permanently: unknown; + /** Conflict */ + conflict: { + content: { + "application/json": components["schemas"]["basic-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"]; + }; + }; + /** Bad Request */ + bad_request: { + content: { + "application/json": components["schemas"]["basic-error"]; + "application/scim+json": components["schemas"]["scim-error"]; + }; + }; + /** Internal Error */ + internal_error: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Found */ + found: unknown; + /** Resource Not Found */ + scim_not_found: { + 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"]; + }; + }; + /** Bad Request */ + scim_bad_request: { + 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"]; + }; + }; + /** Conflict */ + scim_conflict: { + content: { + "application/json": components["schemas"]["scim-error"]; + "application/scim+json": components["schemas"]["scim-error"]; + }; + }; + }; + parameters: { + /** Results per page (max 100). */ + per_page: number; + /** Page number of the results to fetch. */ + page: number; + /** 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; + /** installation_id parameter */ + installation_id: number; + /** grant_id parameter */ + grant_id: number; + /** The client ID of your GitHub app. */ + "client-id": string; + "access-token": string; + app_slug: string; + /** authorization_id parameter */ + authorization_id: number; + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: string; + /** Unique identifier of an organization. */ + org_id: number; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: number; + /** Unique identifier of the self-hosted runner. */ + runner_id: number; + /** 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; + /** + * 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"; + /** 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; + /** 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; + /** + * 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"; + /** gist_id parameter */ + gist_id: string; + /** comment_id parameter */ + comment_id: number; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels: string; + /** One of `asc` (ascending) or `desc` (descending). */ + direction: "asc" | "desc"; + /** account_id parameter */ + account_id: number; + /** plan_id parameter */ + plan_id: number; + /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ + sort: "created" | "updated"; + owner: string; + repo: string; + /** If `true`, show notifications marked as read. */ + all: boolean; + /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating: boolean; + /** 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; + /** thread_id parameter */ + thread_id: number; + /** An organization ID. Only return organizations with an ID greater than this ID. */ + "since-org": number; + org: string; + repository_id: number; + /** secret_name parameter */ + secret_name: string; + username: string; + "hook-id": number; + /** invitation_id parameter */ + invitation_id: number; + /** migration_id parameter */ + migration_id: number; + /** repo_name parameter */ + repo_name: string; + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + package_type: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container"; + /** The name of the package. */ + package_name: string; + /** Unique identifier of the package version. */ + package_version_id: number; + /** team_slug parameter */ + team_slug: string; + "discussion-number": number; + "comment-number": number; + "reaction-id": number; + "project-id": number; + /** card_id parameter */ + card_id: number; + /** column_id parameter */ + column_id: number; + /** artifact_id parameter */ + artifact_id: number; + /** job_id parameter */ + job_id: number; + /** 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; + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + "workflow-run-branch": string; + /** 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://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event: string; + /** 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"; + /** The id of the workflow run */ + "run-id": number; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + "workflow-id": (number | string) & { [key: string]: any }; + /** The name of the branch. */ + branch: string; + /** check_run_id parameter */ + check_run_id: number; + /** check_suite_id parameter */ + check_suite_id: number; + /** Returns check runs with the specified `name`. */ + check_name: string; + /** Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. */ + status: "queued" | "in_progress" | "completed"; + /** 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"]; + /** 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"]; + /** 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"]; + /** 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"]; + /** commit_sha parameter */ + commit_sha: string; + /** deployment_id parameter */ + deployment_id: number; + /** The name of the environment */ + environment_name: string; + /** A user ID. Only return users with an ID greater than this ID. */ + "since-user": number; + /** issue_number parameter */ + issue_number: number; + /** key_id parameter */ + key_id: number; + /** milestone_number parameter */ + milestone_number: number; + "pull-number": number; + /** review_id parameter */ + review_id: number; + /** asset_id parameter */ + asset_id: number; + /** release_id parameter */ + release_id: number; + /** Must be one of: `day`, `week`. */ + per: "day" | "week"; + /** A repository ID. Only return repositories with an ID greater than this ID. */ + "since-repo": number; + /** Used for pagination: the index of the first result to return. */ + start_index: number; + /** Used for pagination: the number of results to return. */ + count: number; + /** Identifier generated by the GitHub SCIM endpoint. */ + scim_group_id: string; + /** scim_user_id parameter */ + scim_user_id: string; + /** 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"; + "team-id": number; + /** gpg_key_id parameter */ + gpg_key_id: number; + }; + headers: { + link?: string; + "content-type"?: string; + "x-common-marker-version"?: string; + "x-rate-limit-limit"?: number; + "x-rate-limit-remaining"?: number; + "x-rate-limit-reset"?: number; + location?: string; + }; +} + +export interface operations { + /** Get Hypermedia links to resources accessible in GitHub's REST API */ + "meta/root": { + responses: { + /** response */ + 200: { + content: { + "application/json": { + current_user_url: string; + current_user_authorizations_html_url: string; + authorizations_url: string; + code_search_url: string; + commit_search_url: string; + emails_url: string; + emojis_url: string; + events_url: string; + feeds_url: string; + followers_url: string; + following_url: string; + gists_url: string; + hub_url: string; + issue_search_url: string; + issues_url: string; + keys_url: string; + label_search_url: string; + notifications_url: string; + organization_url: string; + organization_repositories_url: string; + organization_teams_url: string; + public_gists_url: string; + rate_limit_url: string; + repository_url: string; + repository_search_url: string; + current_user_repositories_url: string; + starred_url: string; + starred_gists_url: string; + topic_search_url?: string; + user_url: string; + user_organizations_url: string; + user_repositories_url: string; + user_search_url: string; + } & { [key: string]: any }; + }; + }; + }; + }; + /** + * 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; + webhook_secret: string; + pem: string; + } & { [key: string]: any }) & { [key: string]: any }; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * 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: { + /** Default 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: { + /** Default response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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. The installation's account type (`target_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-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: { + /** Empty 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": { + /** List of repository names that the token should have access to */ + repositories?: string[]; + /** List of repository IDs that the token should have access to */ + repository_ids?: number[]; + permissions?: components["schemas"]["app-permissions"]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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: { + /** Empty 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: { + /** Empty response */ + 204: never; + 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/). + * + * 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"]; + }; + }; + 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: { + /** Empty response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * 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: { + /** Empty response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** The OAuth access token used to authenticate to the GitHub API. */ + access_token?: string; + } & { [key: string]: any }; + }; + }; + }; + /** + * **Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/). + * + * 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 token as `:access_token` 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 Applications settings page under "Authorized OAuth Apps" on GitHub](https://github.com/settings/applications#authorized). + */ + "apps/revoke-grant-for-application": { + parameters: { + path: { + /** The client ID of your GitHub app. */ + client_id: components["parameters"]["client-id"]; + access_token: components["parameters"]["access-token"]; + }; + }; + responses: { + /** Empty response */ + 204: never; + }; + }; + /** 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": { + /** The access_token of the OAuth application. */ + access_token: string; + } & { [key: string]: any }; + }; + }; + }; + /** 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: { + /** Empty response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** The OAuth access token used to authenticate to the GitHub API. */ + access_token?: string; + } & { [key: string]: any }; + }; + }; + }; + /** 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": { + /** The access_token of the OAuth application. */ + access_token: string; + } & { [key: string]: any }; + }; + }; + }; + /** Exchanges a non-repository scoped user-to-server OAuth access token for a repository 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": { + /** **Required.** The OAuth access token used to authenticate to the GitHub API. */ + access_token?: string; + /** The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. */ + target?: string; + /** The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. */ + target_id?: number; + /** The list of repository IDs to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ + repositories?: string[]; + /** The list of repository names to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. */ + repository_ids?: number[]; + permissions?: components["schemas"]["app-permissions"]; + } & { [key: string]: any }; + }; + }; + }; + /** + * **Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/). + * + * 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) 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/check-authorization": { + parameters: { + path: { + /** The client ID of your GitHub app. */ + client_id: components["parameters"]["client-id"]; + access_token: components["parameters"]["access-token"]; + }; + }; + responses: { + /** response */ + 200: { + content: { + "application/json": (components["schemas"]["authorization"] & { [key: string]: any }) | null; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/). + * + * 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-authorization": { + parameters: { + path: { + /** The client ID of your GitHub app. */ + client_id: components["parameters"]["client-id"]; + access_token: components["parameters"]["access-token"]; + }; + }; + responses: { + /** response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/). + * + * 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/revoke-authorization-for-application": { + parameters: { + path: { + /** The client ID of your GitHub app. */ + client_id: components["parameters"]["client-id"]; + access_token: components["parameters"]["access-token"]; + }; + }; + responses: { + /** Empty response */ + 204: never; + }; + }; + /** + * **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://help.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"]; + }; + }; + 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://help.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://help.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": { + /** A list of scopes that this authorization is in. */ + scopes?: string[] | null; + /** A note to remind you what the OAuth token is for. */ + note?: string; + /** A URL to remind you what app the OAuth token is for. */ + note_url?: string; + /** The OAuth app client key for which to create the token. */ + client_id?: string; + /** The OAuth app client secret for which to create the token. */ + client_secret?: string; + /** A unique string to distinguish an authorization from others created for the same client ID and user. */ + fingerprint?: string; + } & { [key: string]: any }; + }; + }; + }; + /** + * **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: { + /** Response 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": { + /** The OAuth app client secret for which to create the token. */ + client_secret: string; + /** A list of scopes that this authorization is in. */ + scopes?: string[] | null; + /** A note to remind you what the OAuth token is for. */ + note?: string; + /** A URL to remind you what app the OAuth token is for. */ + note_url?: string; + /** A unique string to distinguish an authorization from others created for the same client ID and user. */ + fingerprint?: string; + } & { [key: string]: any }; + }; + }; + }; + /** + * **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: { + /** Response 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": { + /** The OAuth app client secret for which to create the token. */ + client_secret: string; + /** A list of scopes that this authorization is in. */ + scopes?: string[] | null; + /** A note to remind you what the OAuth token is for. */ + note?: string; + /** A URL to remind you what app the OAuth token is for. */ + note_url?: string; + } & { [key: string]: any }; + }; + }; + }; + /** **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: { + /** Empty 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": { + /** A list of scopes that this authorization is in. */ + scopes?: string[] | null; + /** A list of scopes to add to this authorization. */ + add_scopes?: string[]; + /** A list of scopes to remove from this authorization. */ + remove_scopes?: string[]; + /** A note to remind you what the OAuth token is for. */ + note?: string; + /** A URL to remind you what app the OAuth token is for. */ + note_url?: string; + /** A unique string to distinguish an authorization from others created for the same client ID and user. */ + fingerprint?: string; + } & { [key: string]: any }; + }; + }; + }; + "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"]; + 415: components["responses"]["preview_header_missing"]; + }; + }; + "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"]; + 415: components["responses"]["preview_header_missing"]; + }; + }; + /** + * Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` of the content reference from the [`content_reference` event](https://docs.github.com/webhooks/event-payloads/#content_reference) to create an attachment. + * + * The app must create a content attachment within six hours of the content reference URL being posted. See "[Using content attachments](https://docs.github.com/apps/using-content-attachments/)" for details about content attachments. + * + * 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/create-content-attachment": { + parameters: { + path: { + content_reference_id: number; + }; + }; + responses: { + /** response */ + 200: { + content: { + "application/json": components["schemas"]["content-reference-attachment"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 415: components["responses"]["preview_header_missing"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** The title of the attachment */ + title: string; + /** The body of the attachment */ + body: string; + } & { [key: string]: any }; + }; + }; + }; + /** 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: { + /** Empty response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled_organizations: components["schemas"]["enabled-organizations"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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": { + total_count: number; + organizations: components["schemas"]["organization-simple"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** + * 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: { + /** Empty response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** List of organization IDs to enable for GitHub Actions. */ + selected_organization_ids: number[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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: { + /** Empty 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: { + /** Empty 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: { + /** Empty 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 `admin: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": { + total_count: number; + runner_groups: components["schemas"]["runner-groups-enterprise"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** + * Creates a new self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `admin: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": { + /** Name of the runner group. */ + name: string; + /** Visibility of a runner group. You can select all organizations or select individual organization. Can be one of: `all` or `selected` */ + visibility?: "selected" | "all"; + /** List of organization IDs that can access the runner group. */ + selected_organization_ids?: number[]; + /** List of runner IDs to add to the runner group. */ + runners?: number[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * Gets a specific self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `admin: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 `admin: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: { + /** Empty 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 `admin: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": { + /** Name of the runner group. */ + name?: string; + /** Visibility of a runner group. You can select all organizations or select individual organizations. Can be one of: `all` or `selected` */ + visibility?: "selected" | "all"; + } & { [key: string]: any }; + }; + }; + }; + /** + * Lists the organizations with access to a self-hosted runner group. + * + * You must authenticate using an access token with the `admin: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": { + total_count: number; + organizations: components["schemas"]["organization-simple"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** + * 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 `admin: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: { + /** Empty response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** List of organization IDs that can access the runner group. */ + selected_organization_ids: number[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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 `admin: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: { + /** Empty 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 `admin: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: { + /** Empty response */ + 204: never; + }; + }; + /** + * Lists the self-hosted runners that are in a specific enterprise group. + * + * You must authenticate using an access token with the `admin: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": { + total_count: number; + runners: components["schemas"]["runner"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** + * Replaces the list of self-hosted runners that are part of an enterprise runner group. + * + * You must authenticate using an access token with the `admin: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: { + /** Empty response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** List of runner IDs to add to the runner group. */ + runners: number[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * Adds a self-hosted runner to a runner group configured in an enterprise. + * + * You must authenticate using an access token with the `admin: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: { + /** Empty 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 `admin: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: { + /** Empty response */ + 204: never; + }; + }; + /** + * Lists all self-hosted runners configured for an enterprise. + * + * You must authenticate using an access token with the `admin: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": { + total_count?: number; + runners?: components["schemas"]["runner"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `admin: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 `admin: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 `admin: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 a specific self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `admin: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 `admin: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: { + /** Empty response */ + 204: never; + }; + }; + /** + * **Note:** The audit log REST API is currently in beta and is subject to change. + * + * 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. + */ + "audit-log/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"]; + /** Results per page (max 100). */ + per_page?: components["parameters"]["per_page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["audit-log-event"][]; + }; + }; + }; + }; + /** + * 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://help.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 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://help.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://help.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 of the gist */ + description?: string; + /** Names and content for the files that make up the gist */ + files: { + [key: string]: { + /** Content of the file */ + content: string; + } & { [key: string]: any }; + }; + public?: (boolean | ("true" | "false")) & { [key: string]: any }; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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"]; + }; + }; + "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: { + /** Empty 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": + | ((Partial<{ [key: string]: any }> & Partial<{ [key: string]: any }>) & { + /** Description of the gist */ + description?: string; + /** Names of files to be updated */ + files?: { + [key: string]: Partial<{ [key: string]: any }> & + Partial<{ [key: string]: any }> & + Partial<{ [key: string]: any }>; + }; + } & { [key: string]: any }) + | null; + }; + }; + }; + "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": { + /** The comment text. */ + body: string; + } & { [key: string]: any }; + }; + }; + }; + "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: { + /** Empty 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": { + /** The comment text. */ + body: string; + } & { [key: string]: any }; + }; + }; + }; + "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"]; + /** Response if gist is not starred */ + 404: { + content: { + "application/json": { [key: string]: any }; + }; + }; + }; + }; + /** 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: { + /** Empty 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: { + /** Empty response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "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"]; + }; + }; + /** 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": { + total_count: number; + repositories: components["schemas"]["repository"][]; + repository_selection?: string; + } & { [key: string]: any }; + }; + }; + 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: { + /** Empty 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`: All issues the authenticated user can see, regardless of participation or creation + */ + filter?: "assigned" | "created" | "mentioned" | "subscribed" | "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"]; + }; + }; + 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": { + /** The Markdown text to render in HTML. */ + text: string; + /** The rendering mode. */ + mode?: "markdown" | "gfm"; + /** The repository context to use when creating references in `gfm` mode. */ + context?: string; + } & { [key: string]: any }; + }; + }; + }; + /** 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"]; + /** Response 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"]; + /** Response 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://help.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; + } & { [key: string]: any }; + }; + }; + /** response */ + 205: unknown; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** Describes the last point that notifications were checked. */ + last_read_at?: string; + /** Whether the notification has been read. */ + read?: boolean; + } & { [key: string]: any }; + }; + }; + }; + "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: { + /** response */ + 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": { + /** Whether to block all notifications from a thread. */ + ignored?: boolean; + } & { [key: string]: any }; + }; + }; + }; + /** 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: { + /** Empty 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"]; + }; + }; + /** + * 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://help.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"]; + 415: components["responses"]["preview_header_missing"]; + /** Validation Failed */ + 422: { + content: { + "application/json": ( + | components["schemas"]["validation-error"] + | components["schemas"]["validation-error-simple"] + ) & { [key: string]: any }; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** Billing email address. This address is not publicized. */ + billing_email?: string; + /** The company name. */ + company?: string; + /** The publicly visible email address. */ + email?: string; + /** The Twitter username of the company. */ + twitter_username?: string; + /** The location. */ + location?: string; + /** The shorthand name of the company. */ + name?: string; + /** The description of the company. */ + description?: string; + /** Toggles whether an organization can use organization projects. */ + has_organization_projects?: boolean; + /** Toggles whether repositories that belong to the organization can use repository projects. */ + has_repository_projects?: boolean; + /** + * 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_repository_permission?: "read" | "write" | "admin" | "none"; + /** + * 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. + */ + members_can_create_repositories?: boolean; + /** + * 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://help.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; + /** + * 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://help.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; + /** + * 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://help.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; + /** + * 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. + */ + members_allowed_repository_creation_type?: "all" | "private" | "none"; + /** + * 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. + */ + members_can_create_pages?: boolean; + /** + * 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. + */ + members_can_create_public_pages?: boolean; + /** + * 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. + */ + members_can_create_private_pages?: boolean; + blog?: string; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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: { + /** Empty response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled_repositories: components["schemas"]["enabled-repositories"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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": { + total_count: number; + repositories: components["schemas"]["repository"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** + * 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: { + /** Empty response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** List of repository IDs to enable for GitHub Actions. */ + selected_repository_ids: number[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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: { + /** Empty 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: { + /** Empty 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: { + /** Empty response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + /** + * 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": { + total_count: number; + runner_groups: components["schemas"]["runner-groups-org"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** + * 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": { + /** Name of the runner group. */ + name: string; + /** 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`. */ + visibility?: "selected" | "all" | "private"; + /** List of repository IDs that can access the runner group. */ + selected_repository_ids?: number[]; + /** List of runner IDs to add to the runner group. */ + runners?: number[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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: { + /** Empty 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": { + /** Name of the runner group. */ + name?: string; + /** 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`. */ + visibility?: "selected" | "all" | "private"; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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"]; + }; + }; + responses: { + /** response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** + * 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: { + /** Empty response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** List of repository IDs that can access the runner group. */ + selected_repository_ids: number[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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: { + /** Empty 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: { + /** Empty 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": { + total_count: number; + runners: components["schemas"]["runner"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** + * 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: { + /** Empty response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** List of runner IDs to add to the runner group. */ + runners: number[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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: { + /** Empty 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: { + /** Empty 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": { + total_count: number; + runners: components["schemas"]["runner"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** + * 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"]; + }; + }; + }; + }; + /** + * 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: { + /** Empty response */ + 204: never; + }; + }; + /** 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": { + total_count: number; + secrets: components["schemas"]["organization-actions-secret"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** 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 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/stable/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: unknown; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** 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; + /** ID of the key you used to encrypt the secret. */ + key_id?: string; + /** + * 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. + */ + visibility?: "all" | "private" | "selected"; + /** 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[]; + } & { [key: string]: any }; + }; + }; + }; + /** 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: { + /** Empty 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"]; + }; + }; + responses: { + /** response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** 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: { + /** Empty response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** 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[]; + } & { [key: string]: any }; + }; + }; + }; + /** 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: { + /** Response when repository was added to the selected list */ + 204: never; + /** Response 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; + /** Response when visibility type not set to selected */ + 409: unknown; + }; + }; + /** + * **Note:** The audit log REST API is currently in beta and is subject to change. + * + * 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)." + * + * 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: { + /** Empty response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/unblock-user": { + parameters: { + path: { + org: components["parameters"]["org"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Empty response */ + 204: never; + }; + }; + /** + * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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://help.github.com/en/articles/about-authentication-with-saml-single-sign-on). + */ + "orgs/list-saml-sso-authorizations": { + parameters: { + path: { + org: components["parameters"]["org"]; + }; + }; + 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://help.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: { + /** Empty response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "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"][]; + }; + }; + }; + }; + /** 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": { + /** Must be passed as "web". */ + name: string; + /** 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: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + username?: string; + password?: string; + } & { [key: string]: any }; + /** Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. */ + events?: string[]; + /** Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. */ + active?: boolean; + } & { [key: string]: any }; + }; + }; + }; + /** 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: { + /** Empty 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": { + /** 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?: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + } & { [key: string]: any }; + /** Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. */ + events?: string[]; + /** Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. */ + active?: boolean; + name?: string; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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: { + /** Default 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: { + /** Default response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + } & { [key: string]: any }; + }; + }; + }; + /** 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: { + /** Empty 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": { + total_count: number; + installations: components["schemas"]["installation"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** 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"]; + }; + }; + }; + }; + /** 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: { + /** Empty 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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-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": { + /** **Required unless you provide `email`**. GitHub user ID for the person you are inviting. */ + invitee_id?: number; + /** **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. */ + email?: string; + /** + * 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. + */ + role?: "admin" | "direct_member" | "billing_manager"; + /** Specify IDs for the teams you want to invite new members to. */ + team_ids?: number[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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: { + /** Empty 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`: All issues the authenticated user can see, regardless of participation or creation + */ + filter?: "assigned" | "created" | "mentioned" | "subscribed" | "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; + /** Response 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: { + /** Empty 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. */ + "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": { + /** + * 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. + */ + role?: "admin" | "member"; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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: { + /** Empty 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"]; + }; + }; + 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": { + /** A list of arrays indicating which repositories should be migrated. */ + repositories: string[]; + /** Indicates whether repositories should be locked (to prevent manipulation) while migrating data. */ + lock_repositories?: boolean; + /** Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). */ + exclude_attachments?: boolean; + exclude?: string[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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"]; + }; + }; + 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: { + /** Empty 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: { + /** Empty 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://help.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: unknown; + /** User was converted */ + 204: never; + /** response */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + } & { [key: string]: any }; + }; + }; + 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: { + /** Empty response */ + 204: never; + /** Response if user is a member of the organization */ + 422: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + } & { [key: string]: any }; + }; + }; + }; + }; + /** + * 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`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + 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 25 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` scope. 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`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + package_type: components["parameters"]["package_type"]; + /** The name of the package. */ + package_name: components["parameters"]["package_name"]; + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Empty 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` scope. 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`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + package_type: components["parameters"]["package_type"]; + /** The name of the package. */ + package_name: components["parameters"]["package_name"]; + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Empty 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-a-package-owned-by-an-org": { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + 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-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`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + 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 25 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` scope. 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`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + 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: { + /** Empty 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` scope. 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`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + 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: { + /** Empty 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": { + /** The name of the project. */ + name: string; + /** The description of the project. */ + body?: string; + } & { [key: string]: any }; + }; + }; + }; + /** 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; + /** Response 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: { + /** Empty 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: { + /** Empty 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`. 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`. */ + 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 + * * `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": { + /** The name of the repository. */ + name: string; + /** A short description of the repository. */ + description?: string; + /** A URL with more information about the repository. */ + homepage?: string; + /** Either `true` to create a private repository or `false` to create a public one. */ + private?: boolean; + /** + * 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`. For more information, see "[Creating an internal repository](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-repository-visibility#about-internal-repositories)" in the GitHub Help documentation. + * The `visibility` parameter overrides the `private` parameter when you use both parameters with the `nebula-preview` preview header. + */ + visibility?: "public" | "private" | "visibility" | "internal"; + /** Either `true` to enable issues for this repository or `false` to disable them. */ + has_issues?: boolean; + /** 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. */ + has_projects?: boolean; + /** Either `true` to enable the wiki for this repository or `false` to disable it. */ + has_wiki?: boolean; + /** Either `true` to make this repo available as a template repository or `false` to prevent it. */ + is_template?: boolean; + /** 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; + /** Pass `true` to create an initial commit with empty README. */ + auto_init?: boolean; + /** 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; + /** Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.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; + /** Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. */ + allow_squash_merge?: boolean; + /** Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. */ + allow_merge_commit?: boolean; + /** Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. */ + allow_rebase_merge?: boolean; + /** Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. */ + delete_branch_on_merge?: boolean; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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://help.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 free and paid storage usued 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://help.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://help.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://help.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)." + * + * The `per_page` parameter provides pagination for a list of IdP groups the authenticated user can access in an organization. For example, if the user `octocat` wants to see two groups per page in `octo-org` via cURL, it would look like this: + */ + "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 number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + 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://help.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://help.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": { + /** The name of the team. */ + name: string; + /** The description of the team. */ + description?: string; + /** List GitHub IDs for organization members who will become team maintainers. */ + maintainers?: string[]; + /** The full name (e.g., "organization-name/repository-name") of repositories to add the team to. */ + repo_names?: string[]; + /** + * 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` + */ + privacy?: "secret" | "closed"; + /** + * **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. + */ + permission?: "pull" | "push" | "admin"; + /** The ID of a team to set as the parent team. */ + parent_team_id?: number; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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: { + /** Empty 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": { + /** The name of the team. */ + name?: string; + /** The description of the team. */ + description?: string; + /** + * 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. + */ + privacy?: "secret" | "closed"; + /** + * **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. + */ + permission?: "pull" | "push" | "admin"; + /** The ID of a team to set as the parent team. */ + parent_team_id?: number | null; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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"]; + }; + }; + 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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-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": { + /** The discussion post's title. */ + title: string; + /** The discussion post's body text. */ + body: string; + /** 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. */ + private?: boolean; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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: { + /** Empty 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": { + /** The discussion post's title. */ + title?: string; + /** The discussion post's body text. */ + body?: string; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-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": { + /** The discussion comment's body text. */ + body: string; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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: { + /** Empty 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": { + /** The discussion comment's body text. */ + body: string; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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 a `Status: 200 OK` 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 */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + } & { [key: string]: any }; + }; + }; + }; + /** + * **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: { + /** Empty 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 a `Status: 200 OK` 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 */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + } & { [key: string]: any }; + }; + }; + }; + /** + * **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: { + /** Empty 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`. + * + * **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 `role` for organization owners returns as `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-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"]; + }; + }; + /** Response 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://help.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://help.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"]; + }; + }; + /** Response if team synchronization is set up */ + 403: unknown; + /** Response if you attempt to add an organization to a team */ + 422: { + content: { + "application/json": { + message?: string; + errors?: ({ + code?: string; + field?: string; + resource?: string; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * 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. + */ + role?: "member" | "maintainer"; + } & { [key: string]: any }; + }; + }; + }; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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://help.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: { + /** Empty response */ + 204: never; + /** Response 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"]; + }; + }; + /** Response 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: { + /** Empty response */ + 204: never; + /** Response if the project is not owned by the organization */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + } & { [key: string]: any }; + }; + }; + }; + requestBody: { + content: { + "application/json": + | ({ + /** + * 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)." + */ + permission?: "read" | "write" | "admin"; + } & { [key: string]: any }) + | 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: { + /** Empty 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/vnd.github.v3.repository+json": components["schemas"]["team-repository"]; + }; + }; + /** Response if team has permission for the repository */ + 204: never; + /** Response 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://help.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: { + /** Empty response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** + * 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. + * + * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + */ + permission?: "pull" | "push" | "admin" | "maintain" | "triage"; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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: { + /** Empty response */ + 204: never; + }; + }; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.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://help.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": { + /** 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: ({ + /** ID of the IdP group. */ + group_id: string; + /** Name of the IdP group. */ + group_name: string; + /** Description of the IdP group. */ + group_description: string; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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: { + /** Response if child teams exist */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + }; + }; + "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: { + /** Empty response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + } & { [key: string]: any }; + }; + }; + 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": { + /** The project card's note */ + note?: string | null; + /** Whether or not the card is archived */ + archived?: boolean; + } & { [key: string]: any }; + }; + }; + }; + "projects/move-card": { + parameters: { + path: { + /** card_id parameter */ + card_id: components["parameters"]["card_id"]; + }; + }; + responses: { + /** response */ + 201: { + content: { + "application/json": { [key: string]: any }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: ({ + code?: string; + message?: string; + resource?: string; + field?: string; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + }; + }; + 422: components["responses"]["validation_failed"]; + /** Service Unavailable */ + 503: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + errors?: ({ + code?: string; + message?: string; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** The position of the card in a column */ + position: string; + /** The unique identifier of the column the card should be moved to */ + column_id?: number; + } & { [key: string]: any }; + }; + }; + }; + "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: { + /** Empty 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": { + /** Name of the project column */ + name: string; + } & { [key: string]: any }; + }; + }; + }; + "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"]; + }; + }; + /** + * **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. + */ + "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"] + ) & { [key: string]: any }; + }; + }; + /** Service Unavailable */ + 503: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + errors?: ({ + code?: string; + message?: string; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + }; + }; + }; + requestBody: { + content: { + "application/json": ( + | ({ + /** The project card's note */ + note: string | null; + } & { [key: string]: any }) + | ({ + /** The unique identifier of the content associated with the card */ + content_id: number; + /** The piece of content associated with the card */ + content_type: string; + } & { [key: string]: any }) + ) & { [key: string]: any }; + }; + }; + }; + "projects/move-column": { + parameters: { + path: { + /** column_id parameter */ + column_id: components["parameters"]["column_id"]; + }; + }; + responses: { + /** response */ + 201: { + content: { + "application/json": { [key: string]: any }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** The position of the column in a project */ + position: string; + } & { [key: string]: any }; + }; + }; + }; + /** 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": { + message?: string; + documentation_url?: string; + errors?: string[]; + } & { [key: string]: any }; + }; + }; + 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": { + message?: string; + documentation_url?: string; + errors?: string[]; + } & { [key: string]: any }; + }; + }; + /** Response 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": { + /** Name of the project */ + name?: string; + /** Body of the project */ + body?: string | null; + /** State of the project; either 'open' or 'closed' */ + state?: string; + /** The baseline permission that all organization members have on this project */ + organization_permission?: "read" | "write" | "admin" | "none"; + /** Whether or not this project can be seen by everyone. */ + private?: boolean; + } & { [key: string]: any }; + }; + }; + }; + /** 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"]; + 415: components["responses"]["preview_header_missing"]; + 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: { + /** Empty response */ + 204: never; + 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"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** The permission to grant the collaborator. */ + permission?: "read" | "write" | "admin"; + } & { [key: string]: any }; + }; + }; + }; + /** 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: { + /** Empty response */ + 204: never; + 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"]; + 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"]["repository-collaborator-permission"]; + }; + }; + 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"]; + 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": { + /** Name of the project column */ + name: string; + } & { [key: string]: any }; + }; + }; + }; + /** + * **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: { + /** Empty response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 410: components["responses"]["gone"]; + 415: components["responses"]["preview_header_missing"]; + }; + }; + /** + * When you pass the `scarlet-witch-preview` media type, requests to get a repository will also return the repository's code of conduct if it can be detected from the repository's code of conduct file. + * + * 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: { + /** Empty response */ + 204: never; + /** 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": { + message?: string; + documentation_url?: string; + } & { [key: string]: any }; + }; + }; + 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"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** The name of the repository. */ + name?: string; + /** A short description of the repository. */ + description?: string; + /** A URL with more information about the repository. */ + homepage?: string; + /** + * 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://help.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://help.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. + */ + private?: boolean; + /** 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`. The `visibility` parameter overrides the `private` parameter when you use both along with the `nebula-preview` preview header. */ + visibility?: "public" | "private" | "visibility" | "internal"; + /** Either `true` to enable issues for this repository or `false` to disable them. */ + has_issues?: boolean; + /** 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. */ + has_projects?: boolean; + /** Either `true` to enable the wiki for this repository or `false` to disable it. */ + has_wiki?: boolean; + /** Either `true` to make this repo available as a template repository or `false` to prevent it. */ + is_template?: boolean; + /** Updates the default branch for this repository. */ + default_branch?: string; + /** Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. */ + allow_squash_merge?: boolean; + /** Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. */ + allow_merge_commit?: boolean; + /** Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. */ + allow_rebase_merge?: boolean; + /** Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. */ + delete_branch_on_merge?: boolean; + /** `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. */ + archived?: boolean; + } & { [key: string]: any }; + }; + }; + }; + /** 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": { + total_count: number; + artifacts: components["schemas"]["artifact"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** 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: { + /** Empty 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 */ + 202: { + 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: { + /** Empty response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled: components["schemas"]["actions-enabled"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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: { + /** Empty 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": { + total_count: number; + runners: components["schemas"]["runner"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** + * 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"]; + }; + }; + }; + }; + /** + * 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: { + /** Empty response */ + 204: never; + }; + }; + /** + * 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://help.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"]; + }; + }; + responses: { + /** response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** 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"]; + }; + }; + 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: { + /** Empty 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"][]; + }; + }; + }; + }; + /** 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": { + total_count: number; + artifacts: components["schemas"]["artifact"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** 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: 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": { + total_count: number; + jobs: components["schemas"]["job"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** + * 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: { + /** Empty response */ + 204: never; + }; + }; + /** + * 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": { + /** The list of environment ids to approve or reject */ + environment_ids: number[]; + /** Whether to approve or reject deployment to the specified environments. Must be one of: `approved` or `rejected` */ + state: "approved" | "rejected"; + /** A comment to accompany the deployment review */ + comment: string; + } & { [key: string]: any }; + }; + }; + }; + /** 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: 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://help.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": { + total_count: number; + secrets: components["schemas"]["actions-secret"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** 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"]; + }; + }; + }; + }; + /** 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/stable/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: unknown; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** 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; + /** ID of the key you used to encrypt the secret. */ + key_id?: string; + } & { [key: string]: any }; + }; + }; + }; + /** 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: { + /** Empty response */ + 204: never; + }; + }; + /** 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"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** 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: { + /** Empty 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://help.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: { + /** Empty response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** The git reference for the workflow. The reference can be a branch or tag name. */ + ref: string; + /** 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 }; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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: { + /** Empty 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://help.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"]; + }; + }; + responses: { + /** response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** + * 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://help.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://help.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"]; + }; + }; + }; + }; + /** 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://help.github.com/en/articles/configuring-automated-security-fixes)". */ + "repos/enable-automated-security-fixes": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Empty 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://help.github.com/en/articles/configuring-automated-security-fixes)". */ + "repos/disable-automated-security-fixes": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Empty 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"]; + }; + }; + 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://help.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://help.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"]; + 415: components["responses"]["preview_header_missing"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** Require status checks to pass before merging. Set to `null` to disable. */ + required_status_checks: + | ({ + /** Require branches to be up to date before merging. */ + strict: boolean; + /** The list of status checks to require in order to merge into this branch */ + contexts: string[]; + } & { [key: string]: any }) + | null; + /** 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; + /** Require at least one approving review on a pull request, before merging. Set to `null` to disable. */ + required_pull_request_reviews: + | ({ + /** 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?: { + /** The list of user `login`s with dismissal access */ + users?: string[]; + /** The list of team `slug`s with dismissal access */ + teams?: string[]; + } & { [key: string]: any }; + /** Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean; + /** Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) review them. */ + require_code_owner_reviews?: boolean; + /** Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6. */ + required_approving_review_count?: number; + } & { [key: string]: any }) + | null; + /** 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: + | ({ + /** The list of user `login`s with push access */ + users: string[]; + /** The list of team `slug`s with push access */ + teams: string[]; + /** The list of app `slug`s with push access */ + apps?: string[]; + } & { [key: string]: any }) + | null; + /** 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://help.github.com/github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. */ + required_linear_history?: boolean; + /** 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://help.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." */ + allow_force_pushes?: boolean | null; + /** 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://help.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. */ + allow_deletions?: boolean; + } & { [key: string]: any }; + }; + }; + }; + /** 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://help.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: { + /** Empty 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://help.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://help.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://help.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: { + /** No Content */ + 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://help.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/vnd.github.luke-cage-preview+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://help.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: { + /** No Content */ + 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://help.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": { + /** 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?: { + /** The list of user `login`s with dismissal access */ + users?: string[]; + /** The list of team `slug`s with dismissal access */ + teams?: string[]; + } & { [key: string]: any }; + /** Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean; + /** Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) have reviewed. */ + require_code_owner_reviews?: boolean; + /** Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6. */ + required_approving_review_count?: number; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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://help.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://help.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://help.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://help.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: { + /** No Content */ + 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://help.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://help.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: { + /** No Content */ + 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://help.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": { + /** Require branches to be up to date before merging. */ + strict?: boolean; + /** The list of status checks to require in order to merge into this branch */ + contexts?: string[]; + } & { [key: string]: any }; + }; + }; + }; + /** 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://help.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://help.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": { + /** contexts parameter */ + contexts: string[]; + } & { [key: string]: any }; + }; + }; + }; + /** 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://help.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": { + /** contexts parameter */ + contexts: string[]; + } & { [key: string]: any }; + }; + }; + }; + /** 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://help.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": { + /** contexts parameter */ + contexts: string[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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://help.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://help.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: { + /** No Content */ + 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://help.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://help.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": { + /** apps parameter */ + apps: string[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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://help.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": { + /** apps parameter */ + apps: string[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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://help.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": { + /** apps parameter */ + apps: string[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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://help.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://help.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": { + /** teams parameter */ + teams: string[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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://help.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": { + /** teams parameter */ + teams: string[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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://help.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": { + /** teams parameter */ + teams: string[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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://help.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://help.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": { + /** users parameter */ + users: string[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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://help.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": { + /** users parameter */ + users: string[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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://help.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": { + /** users parameter */ + users: string[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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": { + /** The new name of the branch. */ + new_name: string; + } & { [key: string]: any }; + }; + }; + }; + /** + * **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": (Partial< + { + status?: "completed"; + } & { [key: string]: any } + > & + Partial< + { + status?: "queued" | "in_progress"; + } & { [key: string]: any } + >) & { + /** The name of the check. For example, "code-coverage". */ + name: string; + /** The SHA of the commit. */ + head_sha: string; + /** 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; + /** A reference for the run on the integrator's system. */ + external_id?: string; + /** The current status. Can be one of `queued`, `in_progress`, or `completed`. */ + status?: "queued" | "in_progress" | "completed"; + /** 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; + /** + * **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. + */ + conclusion?: + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "success" + | "skipped" + | "stale" + | "timed_out"; + /** 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; + /** 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?: { + /** The title of the check run. */ + title: string; + /** The summary of the check run. This parameter supports Markdown. */ + summary: string; + /** The details of the check run. This parameter supports Markdown. */ + text?: string; + /** 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://help.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?: ({ + /** The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string; + /** The start line of the annotation. */ + start_line: number; + /** The end line of the annotation. */ + end_line: number; + /** 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; + /** 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; + /** The level of the annotation. Can be one of `notice`, `warning`, or `failure`. */ + annotation_level: "notice" | "warning" | "failure"; + /** A short description of the feedback for these lines of code. The maximum size is 64 KB. */ + message: string; + /** The title that represents the annotation. The maximum size is 255 characters. */ + title?: string; + /** Details about this annotation. The maximum size is 64 KB. */ + raw_details?: string; + } & { [key: string]: any })[]; + /** 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?: ({ + /** The alternative text for the image. */ + alt: string; + /** The full URL of the image. */ + image_url: string; + /** A short image description. */ + caption?: string; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + /** 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)." 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?: ({ + /** The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string; + /** A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string; + /** A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * **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": (Partial< + { + status?: "completed"; + } & { [key: string]: any } + > & + Partial< + { + status?: "queued" | "in_progress"; + } & { [key: string]: any } + >) & { + /** The name of the check. For example, "code-coverage". */ + name?: string; + /** The URL of the integrator's site that has the full details of the check. */ + details_url?: string; + /** A reference for the run on the integrator's system. */ + external_id?: string; + /** This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + started_at?: string; + /** The current status. Can be one of `queued`, `in_progress`, or `completed`. */ + status?: "queued" | "in_progress" | "completed"; + /** + * **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. + */ + conclusion?: + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "success" + | "skipped" + | "stale" + | "timed_out"; + /** 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; + /** 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?: { + /** **Required**. */ + title?: string; + /** Can contain Markdown. */ + summary: string; + /** Can contain Markdown. */ + text?: string; + /** 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://help.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?: ({ + /** The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string; + /** The start line of the annotation. */ + start_line: number; + /** The end line of the annotation. */ + end_line: number; + /** 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; + /** 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; + /** The level of the annotation. Can be one of `notice`, `warning`, or `failure`. */ + annotation_level: "notice" | "warning" | "failure"; + /** A short description of the feedback for these lines of code. The maximum size is 64 KB. */ + message: string; + /** The title that represents the annotation. The maximum size is 255 characters. */ + title?: string; + /** Details about this annotation. The maximum size is 64 KB. */ + raw_details?: string; + } & { [key: string]: any })[]; + /** 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?: ({ + /** The alternative text for the image. */ + alt: string; + /** The full URL of the image. */ + image_url: string; + /** A short image description. */ + caption?: string; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + /** 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?: ({ + /** The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string; + /** A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string; + /** A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + }; + }; + }; + /** 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"][]; + }; + }; + }; + }; + /** + * **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: { + /** response */ + 201: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** The sha of the head commit. */ + head_sha: string; + } & { [key: string]: any }; + }; + }; + }; + /** 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": { + /** 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?: ({ + /** The `id` of the GitHub App. */ + app_id: number; + /** Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. */ + setting: boolean; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * **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": { + total_count: number; + check_runs: components["schemas"]["check-run"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** + * 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: unknown; + }; + }; + /** + * 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. 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 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"]; + /** Set to `open`, `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"][]; + }; + }; + 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. 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"]; + }; + }; + 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. 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": { + state: components["schemas"]["code-scanning-alert-set-state"]; + dismissed_reason?: components["schemas"]["code-scanning-alert-dismissed-reason"]; + } & { [key: string]: any }; + }; + }; + }; + /** Lists all instances of the specified code scanning alert. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + "code-scanning/list-alerts-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. + * 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. + * 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). + * For an example response, see "[Custom media type for code scanning](#custom-media-type-for-code-scanning)." + * + * **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/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": 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` and `repo:security_events` scopes. + * 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 + * (see the example default response below). + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in the 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 the deletable analysis for one of the sets, + * step through deleting the analyses in that set, + * and 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 `next_analysis_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 `next_analysis_url` value. Alternatively, you could use the `confirm_delete_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. The parameter can be used without a value as the parameter value is not considered. If you attempt to delete the final analysis in a set without using this parameter 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; + }; + }; + 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. GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * 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 + * ``` + * + * SARIF upload supports a maximum of 1000 results per analysis run. Any results over this limit are ignored. 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"]; + }; + }; + /** Response if the sarif field is invalid */ + 400: unknown; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + /** Response if the sarif field is too large */ + 413: unknown; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; + ref: components["schemas"]["code-scanning-ref"]; + sarif: components["schemas"]["code-scanning-analysis-sarif-file"]; + /** + * 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. + */ + checkout_uri?: string; + /** 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; + /** 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; + } & { [key: string]: any }; + }; + }; + }; + /** 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. 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"]; + /** Response if the sarif id does not match any upload */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * 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. + */ + "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. + */ + "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; + /** Response 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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + * + * For more information the permission levels, see "[Repository permission levels for an organization](https://help.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)". + * + * 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** + * + * To prevent abuse, 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": { + /** + * 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. + */ + permission?: "pull" | "push" | "admin" | "maintain" | "triage"; + permissions?: string; + } & { [key: string]: any }; + }; + }; + }; + "repos/remove-collaborator": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Empty 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: { + /** Response 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: { + /** Empty 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": { + /** The contents of the comment */ + body: string; + } & { [key: string]: any }; + }; + }; + }; + /** 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"]; + 415: components["responses"]["preview_header_missing"]; + }; + }; + /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with a `Status: 200 OK` 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": { + /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment. */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + } & { [key: string]: any }; + }; + }; + }; + /** + * **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: { + /** Empty 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://help.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"][]; + }; + }; + 415: components["responses"]["preview_header_missing"]; + 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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-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": { + /** The contents of the comment. */ + body: string; + /** Relative path of the file to comment on. */ + path?: string; + /** Line index in the diff to comment on. */ + position?: number; + /** **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ + line?: number; + } & { [key: string]: any }; + }; + }; + }; + /** Lists all pull requests containing the provided commit SHA, which can be from any point in the commit history. The results will 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"][]; + }; + }; + 415: components["responses"]["preview_header_missing"]; + }; + }; + /** + * 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; + }; + }; + 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"]; + }; + }; + responses: { + /** response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_runs: components["schemas"]["check-run"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** + * **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": { + total_count: number; + check_suites: components["schemas"]["check-suite"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** + * 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. + * + * The most recent status for each context is returned, up to 100. This field [paginates](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination) if there are over 100 contexts. + * + * 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; + }; + }; + 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"]; + }; + }; + /** + * Returns the contents of the repository's code of conduct file, if one is detected. + * + * A code of conduct is detected if there is a file named `CODE_OF_CONDUCT` in the root directory of the repository. GitHub detects which code of conduct it is using fuzzy matching. + */ + "codes-of-conduct/get-for-repo": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** response */ + 200: { + content: { + "application/json": components["schemas"]["code-of-conduct"]; + }; + }; + }; + }; + /** + * 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"]; + }; + }; + }; + }; + /** + * Both `:base` and `:head` 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** + * + * The response will include a comparison of up to 250 commits. If you are working with a larger commit range, you can use the [List commits](https://docs.github.com/rest/reference/repos#list-commits) to enumerate all commits in the range. + * + * For comparisons with extremely large diffs, you may receive an error response indicating that the diff took too long + * to generate. You can typically resolve this error by using a smaller commit range. + * + * **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"]; + base: string; + head: string; + }; + }; + 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"] + ) & { [key: string]: any }; + }; + }; + 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": { + /** The commit message. */ + message: string; + /** The new file content, using Base64 encoding. */ + content: string; + /** **Required if you are updating a file**. The blob SHA of the file being replaced. */ + sha?: string; + /** The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string; + /** The person that committed the file. Default: the authenticated user. */ + committer?: { + /** The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + date?: string; + } & { [key: string]: any }; + /** The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ + author?: { + /** The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + date?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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": { + /** The commit message. */ + message: string; + /** The blob SHA of the file being replaced. */ + sha: string; + /** The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string; + /** object containing information about the committer. */ + committer?: { + /** The name of the author (or committer) of the commit */ + name?: string; + /** The email of the author (or committer) of the commit */ + email?: string; + } & { [key: string]: any }; + /** object containing information about the author. */ + author?: { + /** The name of the author (or committer) of the commit */ + name?: string; + /** The email of the author (or committer) of the commit */ + email?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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: { + /** Response 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"]; + }; + }; + /** 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; + /** Results per page (max 100). */ + 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/repos#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; + } & { [key: string]: any }; + }; + }; + /** response */ + 409: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + } & { [key: string]: any }; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** The ref to deploy. This can be a branch, tag, or SHA. */ + ref: string; + /** Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). */ + task?: string; + /** Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. */ + auto_merge?: boolean; + /** The [status](https://docs.github.com/rest/reference/repos#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[]; + payload?: ({ [key: string]: any } | string) & { [key: string]: any }; + /** Name for the target deployment environment (e.g., `production`, `staging`, `qa`). */ + environment?: string; + /** Short description of the deployment. */ + description?: string | null; + /** + * Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type. + */ + transient_environment?: boolean; + /** + * Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type. + */ + production_environment?: boolean; + created_at?: string; + } & { [key: string]: any }; + }; + }; + }; + "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"]; + }; + }; + /** + * To ensure there can always be an active deployment, you can only delete an _inactive_ deployment. Anyone with `repo` or `repo_deployment` scopes can delete an inactive 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: { + /** Empty 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": { + /** The state of the status. Can be one of `error`, `failure`, `inactive`, `in_progress`, `queued` `pending`, or `success`. **Note:** To use the `inactive` state, you must provide the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type. To use the `in_progress` and `queued` states, you must provide the [`application/vnd.github.flash-preview+json`](https://docs.github.com/rest/overview/api-previews#deployment-statuses) custom media type. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. */ + state: "error" | "failure" | "inactive" | "in_progress" | "queued" | "pending" | "success"; + /** 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`. */ + target_url?: string; + /** + * 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: `""` + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type. + */ + log_url?: string; + /** A short description of the status. The maximum description length is 140 characters. */ + description?: string; + /** Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. **Note:** This parameter requires you to use the [`application/vnd.github.flash-preview+json`](https://docs.github.com/rest/overview/api-previews#deployment-statuses) custom media type. */ + environment?: "production" | "staging" | "qa"; + /** + * Sets the URL for accessing your environment. Default: `""` + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type. + */ + environment_url?: string; + /** + * 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` + * **Note:** To add an `inactive` status to `production` environments, you must use the [`application/vnd.github.flash-preview+json`](https://docs.github.com/rest/overview/api-previews#deployment-statuses) custom media type. + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type. + */ + auto_inactive?: boolean; + } & { [key: string]: any }; + }; + }; + }; + /** 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"]; + 415: components["responses"]["preview_header_missing"]; + }; + }; + /** + * 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://help.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: { + /** Empty response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** A custom webhook event name. */ + event_type: string; + /** JSON payload with extra information about the webhook event that your action or worklow may use. */ + client_payload?: { [key: string]: any }; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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": { + /** The number of environments in this repository */ + total_count?: number; + environments?: components["schemas"]["environment"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** 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": { + wait_timer?: components["schemas"]["wait-timer"]; + /** 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?: ({ + type?: components["schemas"]["deployment-reviewer-type"]; + /** The id of the user or team who can review the deployment */ + id?: number; + } & { [key: string]: any })[]; + deployment_branch_policy?: components["schemas"]["deployment_branch_policy"]; + } & { [key: string]: any }; + }; + }; + }; + /** 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: { + /** Empty 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"; + /** Results per page (max 100). */ + 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) or [GitHub Premium Support](https://premium.githubsupport.com). + */ + "repos/create-fork": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** response */ + 202: { + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** Optional parameter to specify the organization name if forking into an organization. */ + organization?: string; + } & { [key: string]: any }; + }; + }; + }; + "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": { + /** The new blob's content. */ + content: string; + /** The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. */ + encoding?: string; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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": { + /** The commit message */ + message: string; + /** The SHA of the tree object this commit points to */ + tree: string; + /** 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[]; + /** 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?: { + /** The name of the author (or committer) of the commit */ + name?: string; + /** The email of the author (or committer) of the commit */ + email?: string; + /** 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; + } & { [key: string]: any }; + /** 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?: { + /** The name of the author (or committer) of the commit */ + name?: string; + /** The email of the author (or committer) of the commit */ + email?: string; + /** 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; + } & { [key: string]: any }; + /** 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; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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": { + /** 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; + /** The SHA1 value for this reference. */ + sha: string; + key?: string; + } & { [key: string]: any }; + }; + }; + }; + "git/delete-ref": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + /** ref+ parameter */ + ref: string; + }; + }; + responses: { + /** Empty 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": { + /** The SHA1 value to set this reference to */ + sha: string; + /** 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. */ + force?: boolean; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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": { + /** The tag's name. This is typically a version (e.g., "v0.0.1"). */ + tag: string; + /** The tag message. */ + message: string; + /** The SHA of the git object this is tagging. */ + object: string; + /** The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. */ + type: "commit" | "tree" | "blob"; + /** An object with information about the individual creating the tag. */ + tagger?: { + /** The name of the author of the tag */ + name?: string; + /** The email of the author of the tag */ + email?: string; + /** 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; + } & { [key: string]: any }; + } & { [key: string]: any }; + }; + }; + }; + /** + * **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": { + /** Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ + tree: ({ + /** The file referenced in the tree. */ + path?: string; + /** 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. */ + mode?: "100644" | "100755" | "040000" | "160000" | "120000"; + /** Either `blob`, `tree`, or `commit`. */ + type?: "blob" | "tree" | "commit"; + /** + * 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; + /** + * 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; + } & { [key: string]: any })[]; + /** + * 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; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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": { + /** Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ + name?: string; + /** 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: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + token?: string; + digest?: string; + } & { [key: string]: any }; + /** Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. */ + events?: string[]; + /** Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. */ + active?: boolean; + } & { [key: string]: any }; + }; + }; + }; + /** 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: { + /** Empty 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": { + /** 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?: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + address?: string; + room?: string; + } & { [key: string]: any }; + /** Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. */ + events?: string[]; + /** Determines a list of events to be added to the list of events that the Hook triggers for. */ + add_events?: string[]; + /** Determines a list of events to be removed from the list of events that the Hook triggers for. */ + remove_events?: string[]; + /** Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. */ + active?: boolean; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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: { + /** Default 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: { + /** Default response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + } & { [key: string]: any }; + }; + }; + }; + /** 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: { + /** Empty 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: { + /** Empty 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) or [GitHub Premium Support](https://premium.githubsupport.com) 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": { + /** The URL of the originating repository. */ + vcs_url: string; + /** 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. */ + vcs?: "subversion" | "git" | "mercurial" | "tfvc"; + /** If authentication is required, the username to provide to `vcs_url`. */ + vcs_username?: string; + /** If authentication is required, the password to provide to `vcs_url`. */ + vcs_password?: string; + /** For a tfvc import, the name of the project that is being imported. */ + tfvc_project?: string; + } & { [key: string]: any }; + }; + }; + }; + /** Stop an import for a repository. */ + "migrations/cancel-import": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Empty 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": { + /** The username to provide to the originating repository. */ + vcs_username?: string; + /** The password to provide to the originating repository. */ + vcs_password?: string; + vcs?: string; + tfvc_project?: string; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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": { + /** The new Git author email. */ + email?: string; + /** The new Git author name. */ + name?: string; + remote_id?: string; + } & { [key: string]: any }; + }; + }; + }; + /** 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://help.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": { + /** 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). */ + use_lfs: "opt_in" | "opt_out"; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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"]; + }; + }; + }; + }; + /** 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"]; + }; + }; + /** Conflict */ + 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: { + /** Empty response */ + 204: never; + /** Conflict */ + 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: { + /** Empty 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": { + /** The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. */ + permissions?: "read" | "write" | "maintain" | "triage" | "admin"; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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-simple"][]; + }; + }; + 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://help.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * 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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-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": { + /** The title of the issue. */ + title: (string | number) & { [key: string]: any }; + /** The contents of the issue. */ + body?: string; + /** 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; + milestone?: ((string | number) & { [key: string]: any }) | null; + /** 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 + | ({ + id?: number; + name?: string; + description?: string | null; + color?: string | null; + } & { [key: string]: any }) + ) & { [key: string]: any })[]; + /** 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[]; + } & { [key: string]: any }; + }; + }; + }; + /** 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: { + /** Empty 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": { + /** The contents of the comment. */ + body: string; + } & { [key: string]: any }; + }; + }; + }; + /** 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"]; + 415: components["responses"]["preview_header_missing"]; + }; + }; + /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with a `Status: 200 OK` 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"]; + }; + }; + 415: components["responses"]["preview_header_missing"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment. */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + } & { [key: string]: any }; + }; + }; + }; + /** + * **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: { + /** Empty 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"]; + }; + }; + /** + * 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://help.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": { + /** The title of the issue. */ + title?: ((string | number) & { [key: string]: any }) | null; + /** The contents of the issue. */ + body?: string | null; + /** Login for the user that this issue should be assigned to. **This field is deprecated.** */ + assignee?: string | null; + /** State of the issue. Either `open` or `closed`. */ + state?: "open" | "closed"; + milestone?: ((string | number) & { [key: string]: any }) | null; + /** 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 + | ({ + id?: number; + name?: string; + description?: string | null; + color?: string | null; + } & { [key: string]: any }) + ) & { [key: string]: any })[]; + /** 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[]; + } & { [key: string]: any }; + }; + }; + }; + /** 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-simple"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** 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[]; + } & { [key: string]: any }; + }; + }; + }; + /** 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-simple"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** 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[]; + } & { [key: string]: any }; + }; + }; + }; + /** 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/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-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": { + /** The contents of the comment. */ + body: string; + } & { [key: string]: any }; + }; + }; + }; + "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": { + /** The names of the labels to add to the issue. You can pass an empty array to remove all labels. **Note:** 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. */ + labels?: string[]; + } & { [key: string]: any }; + }; + }; + }; + "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": { + /** The name of the label to add to the issue. Must contain at least one label. **Note:** 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. */ + labels: string[]; + } & { [key: string]: any }; + }; + }; + }; + "issues/remove-all-labels": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + /** issue_number parameter */ + issue_number: components["parameters"]["issue_number"]; + }; + }; + responses: { + /** Empty 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: { + /** Empty 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": + | ({ + /** + * 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` + */ + lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; + } & { [key: string]: any }) + | 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: { + /** Empty 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"]; + 415: components["responses"]["preview_header_missing"]; + }; + }; + /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with a `Status: 200 OK` 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 */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 415: components["responses"]["preview_header_missing"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue. */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + } & { [key: string]: any }; + }; + }; + }; + /** + * **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: { + /** Empty 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"]["issue-event-for-issue"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 415: components["responses"]["preview_header_missing"]; + }; + }; + "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": { + /** A name for the key. */ + title?: string; + /** The contents of the key. */ + key: string; + /** + * 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://help.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://help.github.com/articles/permission-levels-for-a-user-account-repository/)." + */ + read_only?: boolean; + } & { [key: string]: any }; + }; + }; + }; + "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: { + /** Empty 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": { + /** 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.com](http://emoji-cheat-sheet.com/). */ + name: string; + /** The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string; + /** A short description of the label. */ + description?: string; + } & { [key: string]: any }; + }; + }; + }; + "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: { + /** Empty 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": { + /** 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.com](http://emoji-cheat-sheet.com/). */ + new_name?: string; + /** The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string; + /** A short description of the label. */ + description?: string; + } & { [key: string]: any }; + }; + }; + }; + /** 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"]; + }; + }; + }; + }; + /** + * 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"]; + }; + }; + }; + }; + "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"]; + }; + }; + 403: components["responses"]["forbidden"]; + /** response */ + 404: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + } & { [key: string]: any }; + }; + }; + /** Merge conflict response */ + 409: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + } & { [key: string]: any }; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** The name of the base branch that the head will be merged into. */ + base: string; + /** The head to merge. This can be a branch name or a commit SHA1. */ + head: string; + /** Commit message to use for the merge commit. If omitted, a default message will be used. */ + commit_message?: string; + } & { [key: string]: any }; + }; + }; + }; + "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": { + /** The title of the milestone. */ + title: string; + /** The state of the milestone. Either `open` or `closed`. */ + state?: "open" | "closed"; + /** A description of the milestone. */ + description?: string; + /** 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; + } & { [key: string]: any }; + }; + }; + }; + "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: { + /** Empty 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": { + /** The title of the milestone. */ + title?: string; + /** The state of the milestone. Either `open` or `closed`. */ + state?: "open" | "closed"; + /** A description of the milestone. */ + description?: string; + /** 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; + } & { [key: string]: any }; + }; + }; + }; + "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: unknown; + }; + requestBody: { + content: { + "application/json": { + /** 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; + } & { [key: string]: any }; + }; + }; + }; + "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: { + /** Empty response */ + 204: never; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** 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://help.github.com/articles/using-a-custom-domain-with-github-pages/)." */ + cname?: string | null; + /** 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: (Partial<"gh-pages" | "master" | "master /docs"> & + Partial< + { + /** The repository branch used to publish your site's source files. */ + branch: string; + /** The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. */ + path: "/" | "/docs"; + } & { [key: string]: any } + >) & { [key: string]: any }; + } & { [key: string]: any }; + }; + }; + }; + /** 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"]; + 415: components["responses"]["preview_header_missing"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** The source branch and directory used to publish your Pages site. */ + source: { + /** The repository branch used to publish your site's source files. */ + branch: string; + /** The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` */ + path?: "/" | "/docs"; + } & { [key: string]: any }; + } & { [key: string]: any }; + }; + }; + }; + "repos/delete-pages-site": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Empty response */ + 204: never; + 404: components["responses"]["not_found"]; + 415: components["responses"]["preview_header_missing"]; + 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-latest-pages-build": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** response */ + 200: { + content: { + "application/json": components["schemas"]["page-build"]; + }; + }; + }; + }; + "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"]; + }; + }; + }; + }; + /** 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": { + /** The name of the project. */ + name: string; + /** The description of the project. */ + body?: string; + } & { [key: string]: any }; + }; + }; + }; + /** 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://help.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://help.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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse 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": { + /** The title of the new pull request. */ + title?: string; + /** 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; + /** 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; + /** The contents of the pull request. */ + body?: string; + /** Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean; + /** Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ + draft?: boolean; + issue?: number; + } & { [key: string]: any }; + }; + }; + }; + /** 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: { + /** 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"][]; + }; + }; + }; + }; + /** 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: { + /** Empty 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": { + /** The text of the reply to the review comment. */ + body: string; + } & { [key: string]: any }; + }; + }; + }; + /** 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"]; + 415: components["responses"]["preview_header_missing"]; + }; + }; + /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with a `Status: 200 OK` 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"]; + }; + }; + 415: components["responses"]["preview_header_missing"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment. */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + } & { [key: string]: any }; + }; + }; + }; + /** + * **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: { + /** Empty response */ + 204: never; + }; + }; + /** + * 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://help.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://help.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://help.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://help.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://help.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": { + /** The title of the pull request. */ + title?: string; + /** The contents of the pull request. */ + body?: string; + /** State of this Pull Request. Either `open` or `closed`. */ + state?: "open" | "closed"; + /** 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; + /** Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean; + } & { [key: string]: any }; + }; + }; + }; + /** 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. For more information, see the [`comfort-fade` preview notice](https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request-preview-notices). + * + * **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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-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": { + /** The text of the review comment. */ + body: string; + /** 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; + /** The relative path to the file that necessitates a comment. */ + path?: string; + /** **Required without `comfort-fade` preview**. 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; + /** **Required with `comfort-fade` preview**. 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://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. */ + side?: "LEFT" | "RIGHT"; + /** **Required with `comfort-fade` preview**. 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; + /** **Required when using multi-line comments**. 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://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ + start_line?: number; + /** **Required when using multi-line comments**. 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://help.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. */ + start_side?: "LEFT" | "RIGHT" | "side"; + in_reply_to?: number; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-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": { + /** The text of the review comment. */ + body: string; + } & { [key: string]: any }; + }; + }; + }; + /** 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; + /** Response 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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits)" for details. */ + "pulls/merge": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response if merge was successful */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-merge-result"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + /** Response if merge cannot be performed */ + 405: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + } & { [key: string]: any }; + }; + }; + /** Response if sha was provided and pull request head did not match */ + 409: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + } & { [key: string]: any }; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": + | ({ + /** Title for the automatic commit message. */ + commit_title?: string; + /** Extra detail to append to automatic commit message. */ + commit_message?: string; + /** SHA that pull request head must match to allow merge. */ + sha?: string; + /** Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. */ + merge_method?: "merge" | "squash" | "rebase"; + } & { [key: string]: any }) + | 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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-abuse-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"]; + /** Response if user is not a collaborator */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": (Partial<{ [key: string]: any }> & Partial<{ [key: string]: any }>) & { + /** An array of user `login`s that will be requested. */ + reviewers?: string[]; + /** An array of team `slug`s that will be requested. */ + team_reviewers?: string[]; + } & { [key: string]: any }; + }; + }; + }; + "pulls/remove-requested-reviewers": { + parameters: { + path: { + owner: components["parameters"]["owner"]; + repo: components["parameters"]["repo"]; + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** response */ + 200: unknown; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** An array of user `login`s that will be removed. */ + reviewers: string[]; + /** An array of team `slug`s that will be removed. */ + team_reviewers?: string[]; + } & { [key: string]: any }; + }; + }; + }; + /** 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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-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": { + /** 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; + /** **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */ + body?: string; + /** 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. */ + event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + /** Use the following table to specify the location, destination, and contents of the draft review comment. */ + comments?: ({ + /** The relative path to the file that necessitates a review comment. */ + path: string; + /** 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; + /** Text of the review comment. */ + body: string; + line?: number; + side?: string; + start_line?: number; + start_side?: string; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + }; + }; + }; + "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": { + /** The body text of the pull request review. */ + body: string; + } & { [key: string]: any }; + }; + }; + }; + "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": { + /** The message for the pull request review dismissal */ + message: string; + event?: string; + } & { [key: string]: any }; + }; + }; + }; + "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": { + /** The body text of the pull request review */ + body?: string; + /** 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. */ + event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + } & { [key: string]: any }; + }; + }; + }; + /** 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; + } & { [key: string]: any }; + }; + }; + 403: components["responses"]["forbidden"]; + 415: components["responses"]["preview_header_missing"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": + | ({ + /** 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; + } & { [key: string]: any }) + | null; + }; + }; + }; + /** + * 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"]; + }; + }; + /** + * 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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-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"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** The name of the tag. */ + tag_name: string; + /** 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; + /** The name of the release. */ + name?: string; + /** Text describing the contents of the tag. */ + body?: string; + /** `true` to create a draft (unpublished) release, `false` to create a published one. */ + draft?: boolean; + /** `true` to identify the release as a prerelease. `false` to identify the release as a full release. */ + prerelease?: boolean; + } & { [key: string]: any }; + }; + }; + }; + /** 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: { + /** Empty 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": { + /** The file name of the asset. */ + name?: string; + /** An alternate short description of the asset. Used in place of the filename. */ + label?: string; + state?: string; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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"]; + }; + }; + /** **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: { + /** Empty 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"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** The name of the tag. */ + tag_name?: string; + /** 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; + /** The name of the release. */ + name?: string; + /** Text describing the contents of the tag. */ + body?: string; + /** `true` makes the release a draft, and `false` publishes the release. */ + draft?: boolean; + /** `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ + prerelease?: boolean; + } & { [key: string]: any }; + }; + }; + }; + "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). + * * 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"]; + }; + }; + }; + requestBody: { + content: { + "*/*": string; + }; + }; + }; + /** + * Lists all 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?: "open" | "resolved"; + /** 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: { + /** Default 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; + 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: { + /** Default 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": { + state: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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"][]; + "application/vnd.github.v3.star+json": 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"][]; + }; + }; + }; + }; + /** 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"][]; + }; + }; + }; + }; + /** + * 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"][]; + }; + }; + }; + }; + /** + * 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"][]; + }; + }; + }; + }; + /** + * 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": { + /** The state of the status. Can be one of `error`, `failure`, `pending`, or `success`. */ + state: "error" | "failure" | "pending" | "success"; + /** + * 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; + /** A short description of the status. */ + description?: string; + /** A string label to differentiate this status from the status of other systems. This field is case-insensitive. */ + context?: string; + } & { [key: string]: any }; + }; + }; + }; + /** 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: { + /** Response if you subscribe to the repository */ + 200: { + content: { + "application/json": components["schemas"]["repository-subscription"]; + }; + }; + 403: components["responses"]["forbidden"]; + /** Response 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": { + /** Determines if notifications should be received from this repository. */ + subscribed?: boolean; + /** Determines if all notifications should be blocked from this repository. */ + ignored?: boolean; + } & { [key: string]: any }; + }; + }; + }; + /** 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: { + /** Empty 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"]; + }; + }; + responses: { + /** response */ + 200: { + content: { + "application/json": components["schemas"]["topic"]; + }; + }; + 404: components["responses"]["not_found"]; + 415: components["responses"]["preview_header_missing"]; + }; + }; + "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"]; + 415: components["responses"]["preview_header_missing"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** 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[]; + } & { [key: string]: any }; + }; + }; + }; + /** 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://help.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"]["repository"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** The username or organization name the repository will be transferred to. */ + new_owner: string; + /** ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */ + team_ids?: number[]; + } & { [key: string]: any }; + }; + }; + }; + /** 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://help.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; + /** Response 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://help.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: { + /** Empty 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://help.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: { + /** Empty 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 + * * `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": { + /** 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; + /** The name of the new repository. */ + name: string; + /** A short description of the new repository. */ + description?: string; + /** 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`. */ + include_all_branches?: boolean; + /** Either `true` to create a new private repository or `false` to create a new public one. */ + private?: boolean; + } & { [key: string]: any }; + }; + }; + }; + /** + * Lists all public repositories in the order that they were created. + * + * 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 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": { + total_count: number; + secrets: components["schemas"]["actions-secret"][]; + } & { [key: string]: any }; + }; + }; + }; + }; + /** 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"]; + }; + }; + }; + }; + /** 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/stable/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: unknown; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** 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; + /** ID of the key you used to encrypt the secret. */ + key_id?: string; + } & { [key: string]: any }; + }; + }; + }; + /** 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: { + /** Empty response */ + 204: never; + }; + }; + /** **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"]; + }; + }; + 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": { + /** The SCIM schema URIs. */ + schemas: string[]; + /** The name of the SCIM group. This must match the GitHub organization that the group maps to. */ + displayName: string; + members?: ({ + /** The SCIM user ID for a user. */ + value: string; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + }; + }; + }; + /** **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"]; + }; + }; + 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": { + /** The SCIM schema URIs. */ + schemas: string[]; + /** The name of the SCIM group. This must match the GitHub organization that the group maps to. */ + displayName: string; + members?: ({ + /** The SCIM user ID for a user. */ + value: string; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + }; + }; + }; + /** **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: { + /** Empty 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": { + /** The SCIM schema URIs. */ + schemas: string[]; + /** Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ + Operations: { [key: string]: any }[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * **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"]; + }; + }; + 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": { + /** The SCIM schema URIs. */ + schemas: string[]; + /** The username for the user. */ + userName: string; + name: { + /** The first name of the user. */ + givenName: string; + /** The last name of the user. */ + familyName: string; + } & { [key: string]: any }; + /** List of user emails. */ + emails: ({ + /** The email address. */ + value: string; + /** The type of email address. */ + type: string; + /** Whether this email address is the primary address. */ + primary: boolean; + } & { [key: string]: any })[]; + /** List of SCIM group IDs the user is a member of. */ + groups?: ({ + value?: string; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + }; + }; + }; + /** **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": { + /** The SCIM schema URIs. */ + schemas: string[]; + /** The username for the user. */ + userName: string; + name: { + /** The first name of the user. */ + givenName: string; + /** The last name of the user. */ + familyName: string; + } & { [key: string]: any }; + /** List of user emails. */ + emails: ({ + /** The email address. */ + value: string; + /** The type of email address. */ + type: string; + /** Whether this email address is the primary address. */ + primary: boolean; + } & { [key: string]: any })[]; + /** List of SCIM group IDs the user is a member of. */ + groups?: ({ + value?: string; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + }; + }; + }; + /** **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: { + /** Empty 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": { + /** The SCIM schema URIs. */ + schemas: string[]; + /** Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ + Operations: { [key: string]: any }[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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": { + /** Configured by the admin. Could be an email, login, or username */ + userName: string; + /** The name of the user, suitable for display to end-users */ + displayName?: string; + name: { + givenName: string; + familyName: string; + formatted?: string; + } & { [key: string]: any }; + /** user emails */ + emails: ({ + value: string; + primary?: boolean; + type?: string; + } & { [key: string]: any })[]; + schemas?: string[]; + externalId?: string; + groups?: string[]; + active?: boolean; + } & { [key: string]: any }; + }; + }; + }; + "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": { + schemas?: string[]; + /** The name of the user, suitable for display to end-users */ + displayName?: string; + externalId?: string; + groups?: string[]; + active?: boolean; + /** Configured by the admin. Could be an email, login, or username */ + userName: string; + name: { + givenName: string; + familyName: string; + formatted?: string; + } & { [key: string]: any }; + /** user emails */ + emails: ({ + type?: string; + value: string; + primary?: boolean; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + }; + }; + }; + "scim/delete-user-from-org": { + parameters: { + path: { + org: components["parameters"]["org"]; + /** scim_user_id parameter */ + scim_user_id: components["parameters"]["scim_user_id"]; + }; + }; + responses: { + /** Empty 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"]; + /** Too many requests */ + 429: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + schemas?: string[]; + /** Set of operations to be performed */ + Operations: ({ + op: "add" | "remove" | "replace"; + path?: string; + value?: ( + | ({ + active?: boolean | null; + userName?: string | null; + externalId?: string | null; + givenName?: string | null; + familyName?: string | null; + } & { [key: string]: any }) + | ({ + value?: string; + primary?: boolean; + } & { [key: string]: any })[] + | string + ) & { [key: string]: any }; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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://help.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": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["code-search-result-item"][]; + } & { [key: string]: any }; + }; + }; + 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://help.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": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["commit-search-result-item"][]; + } & { [key: string]: any }; + }; + }; + 304: components["responses"]["not_modified"]; + 415: components["responses"]["preview_header_missing"]; + }; + }; + /** + * 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://help.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": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["issue-search-result-item"][]; + } & { [key: string]: any }; + }; + }; + 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"]; + }; + }; + responses: { + /** response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["label-search-result-item"][]; + } & { [key: string]: any }; + }; + }; + 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. + * + * When you include the `mercy` preview header, you can also search for multiple topics by adding more `topic:` instances. For example, your query might look like this: + * + * `q=topic:ruby+topic:rails` + */ + "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://help.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": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["repo-search-result-item"][]; + } & { [key: string]: any }; + }; + }; + 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://help.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; + }; + }; + responses: { + /** response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["topic-search-result-item"][]; + } & { [key: string]: any }; + }; + }; + 304: components["responses"]["not_modified"]; + 415: components["responses"]["preview_header_missing"]; + }; + }; + /** + * 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://help.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": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["user-search-result-item"][]; + } & { [key: string]: any }; + }; + }; + 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: { + /** Empty 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 */ + 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": { + /** The name of the team. */ + name: string; + /** The description of the team. */ + description?: string; + /** + * 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. + */ + privacy?: "secret" | "closed"; + /** + * **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. + */ + permission?: "pull" | "push" | "admin"; + /** The ID of a team to set as the parent team. */ + parent_team_id?: number | null; + } & { [key: string]: any }; + }; + }; + }; + /** + * **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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-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": { + /** The discussion post's title. */ + title: string; + /** The discussion post's body text. */ + body: string; + /** 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. */ + private?: boolean; + } & { [key: string]: any }; + }; + }; + }; + /** + * **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: { + /** Empty 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": { + /** The discussion post's title. */ + title?: string; + /** The discussion post's body text. */ + body?: string; + } & { [key: string]: any }; + }; + }; + }; + /** + * **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 abuse rate limiting. See "[Abuse rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-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": { + /** The discussion comment's body text. */ + body: string; + } & { [key: string]: any }; + }; + }; + }; + /** + * **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: { + /** Empty 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": { + /** The discussion comment's body text. */ + body: string; + } & { [key: string]: any }; + }; + }; + }; + /** + * **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 a `Status: 200 OK` 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": { + /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + } & { [key: string]: any }; + }; + }; + }; + /** + * **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 a `Status: 200 OK` 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": { + /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. */ + content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; + } & { [key: string]: any }; + }; + }; + }; + /** + * **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: { + /** Response if user is a member */ + 204: never; + /** Response 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://help.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://help.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: { + /** Empty response */ + 204: never; + 403: components["responses"]["forbidden"]; + /** Response if team synchronization is set up */ + 404: unknown; + /** response */ + 422: { + content: { + "application/json": { + message?: string; + errors?: ({ + code?: string; + field?: string; + resource?: string; + } & { [key: string]: any })[]; + documentation_url?: string; + } & { [key: string]: any }; + }; + }; + }; + }; + /** + * 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://help.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://help.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: { + /** Empty response */ + 204: never; + /** Response 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 `role` for organization owners returns as `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://help.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://help.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"]; + }; + }; + /** Response if team synchronization is set up */ + 403: unknown; + 404: components["responses"]["not_found"]; + /** Response if you attempt to add an organization to a team */ + 422: { + content: { + "application/json": { + message?: string; + errors?: ({ + code?: string; + field?: string; + resource?: string; + } & { [key: string]: any })[]; + documentation_url?: string; + } & { [key: string]: any }; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * 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. + */ + role?: "member" | "maintainer"; + } & { [key: string]: any }; + }; + }; + }; + /** + * **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://help.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://help.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: { + /** Empty response */ + 204: never; + /** Response 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"]; + 415: components["responses"]["preview_header_missing"]; + }; + }; + /** + * **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"]; + }; + }; + /** Response if project is not managed by this team */ + 404: unknown; + 415: components["responses"]["preview_header_missing"]; + }; + }; + /** + * **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: { + /** Empty response */ + 204: never; + /** Response if the project is not owned by the organization */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + } & { [key: string]: any }; + }; + }; + 404: components["responses"]["not_found"]; + 415: components["responses"]["preview_header_missing"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * 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)." + */ + permission?: "read" | "write" | "admin"; + } & { [key: string]: any }; + }; + }; + }; + /** + * **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: { + /** Empty 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/vnd.github.v3.repository+json": components["schemas"]["team-repository"]; + }; + }; + /** Response if repository is managed by this team */ + 204: never; + /** Response 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: { + /** Empty response */ + 204: never; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * 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. + */ + permission?: "pull" | "push" | "admin"; + } & { [key: string]: any }; + }; + }; + }; + /** + * **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: { + /** Empty 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://help.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://help.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": { + /** 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: ({ + /** ID of the IdP group. */ + group_id: string; + /** Name of the IdP group. */ + group_name: string; + /** Description of the IdP group. */ + group_description: string; + id?: string; + name?: string; + description?: string; + } & { [key: string]: any })[]; + synced_at?: string; + } & { [key: string]: any }; + }; + }; + }; + /** **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: { + /** Response 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"]) & { + [key: string]: any; + }; + }; + }; + 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": { + /** The new name of the user. */ + name?: string; + /** The publicly visible email address of the user. */ + email?: string; + /** The new blog URL of the user. */ + blog?: string; + /** The new Twitter username of the user. */ + twitter_username?: string | null; + /** The new company of the user. */ + company?: string; + /** The new location of the user. */ + location?: string; + /** The new hiring availability of the user. */ + hireable?: boolean; + /** The new short biography of the user. */ + bio?: string; + } & { [key: string]: any }; + }; + }; + }; + /** List the users you've blocked on your personal account. */ + "users/list-blocked-by-authenticated": { + 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: { + /** Empty 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: { + /** Empty response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Sets the visibility for your primary email addresses. */ + "users/set-primary-email-visibility-for-authenticated": { + 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": { + /** An email address associated with the GitHub user account to manage. */ + email: string; + /** Denotes whether an email is publically visible. */ + visibility: "public" | "private"; + } & { [key: string]: any }; + }; + }; + }; + /** 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": { + 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": { + 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": ( + | ({ + /** 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. */ + emails: string[]; + } & { [key: string]: any }) + | string[] + | string + ) & { [key: string]: any }; + }; + }; + }; + /** This endpoint is accessible with the `user` scope. */ + "users/delete-email-for-authenticated": { + parameters: {}; + responses: { + /** Empty 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": ( + | ({ + /** Email addresses associated with the GitHub user account. */ + emails: string[]; + } & { [key: string]: any }) + | string[] + | string + ) & { [key: string]: any }; + }; + }; + }; + /** 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": { + 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: { + /** Response 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"]; + /** Response 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: { + /** Empty 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: { + /** Empty 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": { + 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": { + 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": { + /** A GPG key in ASCII-armored format. */ + armored_public_key: string; + } & { [key: string]: any }; + }; + }; + }; + /** 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": { + 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": { + parameters: { + path: { + /** gpg_key_id parameter */ + gpg_key_id: components["parameters"]["gpg_key_id"]; + }; + }; + responses: { + /** Empty 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": { + total_count: number; + installations: components["schemas"]["installation"][]; + } & { [key: string]: any }; + }; + }; + 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": { + total_count: number; + repository_selection?: string; + repositories: components["schemas"]["repository"][]; + } & { [key: string]: any }; + }; + }; + 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": { + parameters: { + path: { + /** installation_id parameter */ + installation_id: components["parameters"]["installation_id"]; + repository_id: components["parameters"]["repository_id"]; + }; + }; + responses: { + /** Empty 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": { + parameters: { + path: { + /** installation_id parameter */ + installation_id: components["parameters"]["installation_id"]; + repository_id: components["parameters"]["repository_id"]; + }; + }; + responses: { + /** Empty 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. If there are no restrictions, you will see an empty response. */ + "interactions/get-restrictions-for-authenticated-user": { + responses: { + /** response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + }; + }; + /** 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: { + /** Empty 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`: All issues the authenticated user can see, regardless of participation or creation + */ + filter?: "assigned" | "created" | "mentioned" | "subscribed" | "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": { + 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": { + 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": { + /** A descriptive name for the new key. */ + title?: string; + /** The public SSH key to add to your GitHub account. */ + key: string; + } & { [key: string]: any }; + }; + }; + }; + /** 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": { + 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": { + parameters: { + path: { + /** key_id parameter */ + key_id: components["parameters"]["key_id"]; + }; + }; + responses: { + /** Empty 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": { + /** The state that the membership should be in. Only `"active"` will be accepted. */ + state: "active"; + } & { [key: string]: any }; + }; + }; + }; + /** 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": { + /** Lock the repositories being migrated at the start of the migration */ + lock_repositories?: boolean; + /** Do not include attachments in the migration */ + exclude_attachments?: boolean; + /** Exclude attributes from the API response to improve performance */ + exclude?: "repositories"[]; + repositories: string[]; + } & { [key: string]: any }; + }; + }; + }; + /** + * 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: { + /** Empty 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: { + /** Empty 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-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"]; + }; + }; + /** + * 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`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + 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 25 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` scope. + * 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`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + package_type: components["parameters"]["package_type"]; + /** The name of the package. */ + package_name: components["parameters"]["package_name"]; + }; + }; + responses: { + /** Empty 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` scope. 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`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + package_type: components["parameters"]["package_type"]; + /** The name of the package. */ + package_name: components["parameters"]["package_name"]; + }; + }; + responses: { + /** Empty 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-a-package-owned-by-the-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + 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-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`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + 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 25 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` scope. + * 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`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + 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: { + /** Empty 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` scope. 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`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + 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: { + /** Empty 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": { + /** Name of the project */ + name: string; + /** Body of the project */ + body?: string | null; + } & { [key: string]: any }; + }; + }; + }; + /** 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": { + 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`. */ + 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`. 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 + * * `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": { + /** The name of the repository. */ + name: string; + /** A short description of the repository. */ + description?: string; + /** A URL with more information about the repository. */ + homepage?: string; + /** Whether the repository is private or public. */ + private?: boolean; + /** Whether issues are enabled. */ + has_issues?: boolean; + /** Whether projects are enabled. */ + has_projects?: boolean; + /** Whether the wiki is enabled. */ + has_wiki?: boolean; + /** 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; + /** Whether the repository is initialized with a minimal README. */ + auto_init?: boolean; + /** The desired language or platform to apply to the .gitignore. */ + gitignore_template?: string; + /** The license keyword of the open source license for this repository. */ + license_template?: string; + /** Whether to allow squash merges for pull requests. */ + allow_squash_merge?: boolean; + /** Whether to allow merge commits for pull requests. */ + allow_merge_commit?: boolean; + /** Whether to allow rebase merges for pull requests. */ + allow_rebase_merge?: boolean; + /** Whether to delete head branches when pull requests are merged */ + delete_branch_on_merge?: boolean; + /** Whether downloads are enabled. */ + has_downloads?: boolean; + /** Whether this repository acts as a template that can be used to generate new repositories. */ + is_template?: boolean; + } & { [key: string]: any }; + }; + }; + }; + /** 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": { + parameters: { + path: { + /** invitation_id parameter */ + invitation_id: components["parameters"]["invitation_id"]; + }; + }; + responses: { + /** Empty response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + "repos/accept-invitation": { + parameters: { + path: { + /** invitation_id parameter */ + invitation_id: components["parameters"]["invitation_id"]; + }; + }; + responses: { + /** Empty 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"]; + /** Response 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: { + /** Empty 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: { + /** Empty 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"]) & { + [key: string]: any; + }; + }; + }; + 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: { + /** Response if the user follows the target user */ + 204: never; + /** Response 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://help.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"][]; + }; + }; + }; + }; + /** + * 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`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + 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"]; + }; + }; + }; + }; + /** + * 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`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + 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`. For Docker images that use the package namespace `https://ghcr.io/owner/package-name`, use `container`. */ + 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"]; + }; + }; + }; + }; + "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"][]; + }; + }; + 415: components["responses"]["preview_header_missing"]; + 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. */ + "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 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://help.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://help.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://help.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"]["repository"][]; + "application/vnd.github.v3.star+json": components["schemas"]["starred-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; + }; + }; + }; + }; +} diff --git a/tests/v3/expected/github.immutable.ts b/tests/v3/expected/github.immutable.ts index 4c454fe6d..5d18a1e34 100644 --- a/tests/v3/expected/github.immutable.ts +++ b/tests/v3/expected/github.immutable.ts @@ -5132,29 +5132,27 @@ export interface paths { export interface components { readonly schemas: { /** Simple User */ - readonly "simple-user": - | ({ - readonly login: string; - readonly id: number; - readonly node_id: string; - readonly avatar_url: string; - readonly gravatar_id: string | null; - readonly url: string; - readonly html_url: string; - readonly followers_url: string; - readonly following_url: string; - readonly gists_url: string; - readonly starred_url: string; - readonly subscriptions_url: string; - readonly organizations_url: string; - readonly repos_url: string; - readonly events_url: string; - readonly received_events_url: string; - readonly type: string; - readonly site_admin: boolean; - readonly starred_at?: string; - } & { readonly [key: string]: any }) - | null; + readonly "simple-user": { + readonly login: string; + readonly id: number; + readonly node_id: string; + readonly avatar_url: string; + readonly gravatar_id: string | null; + readonly url: string; + readonly html_url: string; + readonly followers_url: string; + readonly following_url: string; + readonly gists_url: string; + readonly starred_url: string; + readonly subscriptions_url: string; + readonly organizations_url: string; + readonly repos_url: string; + readonly events_url: string; + readonly received_events_url: string; + readonly type: string; + readonly site_admin: boolean; + readonly starred_at?: string; + } | null; /** 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. */ readonly integration: { /** Unique identifier of the GitHub app */ @@ -5162,7 +5160,7 @@ export interface components { /** The slug name of the GitHub app */ readonly slug?: string; readonly node_id: string; - readonly owner: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly owner: components["schemas"]["simple-user"] | null; /** The name of the GitHub app */ readonly name: string; readonly description: string | null; @@ -5191,13 +5189,13 @@ export interface components { readonly "basic-error": { readonly message?: string; readonly documentation_url?: string; - } & { readonly [key: string]: any }; + }; /** Validation Error Simple */ readonly "validation-error-simple": { readonly message: string; readonly documentation_url: string; readonly errors?: readonly string[]; - } & { readonly [key: string]: any }; + }; /** The URL to which the payloads will be delivered. */ readonly "webhook-config-url": string; /** The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. */ @@ -5212,7 +5210,7 @@ export interface components { readonly content_type?: components["schemas"]["webhook-config-content-type"]; readonly secret?: components["schemas"]["webhook-config-secret"]; readonly insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; - } & { readonly [key: string]: any }; + }; /** An enterprise account */ readonly enterprise: { /** A short description of the enterprise. */ @@ -5230,15 +5228,13 @@ export interface components { readonly created_at: string | null; readonly updated_at: string | null; readonly avatar_url: string; - } & { readonly [key: string]: any }; + }; /** Installation */ readonly installation: { /** The ID of the installation. */ readonly id: number; readonly account: - | ((Partial & Partial) & { - readonly [key: string]: any; - }) + | (Partial & Partial) | null; /** Describe whether all repositories have been selected or there's a selection involved */ readonly repository_selection: "all" | "selected"; @@ -5258,7 +5254,7 @@ export interface components { readonly statuses?: string; readonly issues?: string; readonly organization_administration?: string; - } & { readonly [key: string]: any }; + }; readonly events: readonly string[]; readonly created_at: string; readonly updated_at: string; @@ -5266,10 +5262,10 @@ export interface components { readonly has_multiple_single_files?: boolean; readonly single_file_paths?: readonly string[]; readonly app_slug: string; - readonly suspended_by?: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly suspended_by?: components["schemas"]["simple-user"] | null; readonly suspended_at?: string | null; readonly contact_email?: string | null; - } & { readonly [key: string]: any }; + }; /** The permissions granted to the user-to-server access token. */ readonly "app-permissions": { /** The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be one of: `read` or `write`. */ @@ -5332,7 +5328,7 @@ export interface components { readonly organization_user_blocking?: "read" | "write"; /** The level of permission to grant the access token to manage team discussions and related comments. Can be one of: `read` or `write`. */ readonly team_discussions?: "read" | "write"; - } & { readonly [key: string]: any }; + }; /** License Simple */ readonly "license-simple": { readonly key: string; @@ -5341,7 +5337,7 @@ export interface components { readonly spdx_id: string | null; readonly node_id: string; readonly html_url?: string; - } & { readonly [key: string]: any }; + }; /** A git repository */ readonly repository: { /** Unique identifier of the repository */ @@ -5350,7 +5346,7 @@ export interface components { /** The name of the repository. */ readonly name: string; readonly full_name: string; - readonly license: (components["schemas"]["license-simple"] & { readonly [key: string]: any }) | null; + readonly license: components["schemas"]["license-simple"] | null; readonly forks: number; readonly permissions?: { readonly admin: boolean; @@ -5358,8 +5354,8 @@ export interface components { readonly triage?: boolean; readonly push: boolean; readonly maintain?: boolean; - } & { readonly [key: string]: any }; - readonly owner: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + }; + readonly owner: components["schemas"]["simple-user"] | null; /** Whether the repository is private or public. */ readonly private: boolean; readonly html_url: string; @@ -5439,113 +5435,111 @@ export interface components { readonly updated_at: string | null; /** Whether to allow rebase merges for pull requests. */ readonly allow_rebase_merge?: boolean; - readonly template_repository?: - | ({ - readonly id?: number; - readonly node_id?: string; - readonly name?: string; - readonly full_name?: string; - readonly owner?: { - readonly login?: string; - readonly id?: number; - readonly node_id?: string; - readonly avatar_url?: string; - readonly gravatar_id?: string; - readonly url?: string; - readonly html_url?: string; - readonly followers_url?: string; - readonly following_url?: string; - readonly gists_url?: string; - readonly starred_url?: string; - readonly subscriptions_url?: string; - readonly organizations_url?: string; - readonly repos_url?: string; - readonly events_url?: string; - readonly received_events_url?: string; - readonly type?: string; - readonly site_admin?: boolean; - } & { readonly [key: string]: any }; - readonly private?: boolean; - readonly html_url?: string; - readonly description?: string; - readonly fork?: boolean; - readonly url?: string; - readonly archive_url?: string; - readonly assignees_url?: string; - readonly blobs_url?: string; - readonly branches_url?: string; - readonly collaborators_url?: string; - readonly comments_url?: string; - readonly commits_url?: string; - readonly compare_url?: string; - readonly contents_url?: string; - readonly contributors_url?: string; - readonly deployments_url?: string; - readonly downloads_url?: string; - readonly events_url?: string; - readonly forks_url?: string; - readonly git_commits_url?: string; - readonly git_refs_url?: string; - readonly git_tags_url?: string; - readonly git_url?: string; - readonly issue_comment_url?: string; - readonly issue_events_url?: string; - readonly issues_url?: string; - readonly keys_url?: string; - readonly labels_url?: string; - readonly languages_url?: string; - readonly merges_url?: string; - readonly milestones_url?: string; - readonly notifications_url?: string; - readonly pulls_url?: string; - readonly releases_url?: string; - readonly ssh_url?: string; - readonly stargazers_url?: string; - readonly statuses_url?: string; - readonly subscribers_url?: string; - readonly subscription_url?: string; - readonly tags_url?: string; - readonly teams_url?: string; - readonly trees_url?: string; - readonly clone_url?: string; - readonly mirror_url?: string; - readonly hooks_url?: string; - readonly svn_url?: string; - readonly homepage?: string; - readonly language?: string; - readonly forks_count?: number; - readonly stargazers_count?: number; - readonly watchers_count?: number; - readonly size?: number; - readonly default_branch?: string; - readonly open_issues_count?: number; - readonly is_template?: boolean; - readonly topics?: readonly string[]; - readonly has_issues?: boolean; - readonly has_projects?: boolean; - readonly has_wiki?: boolean; - readonly has_pages?: boolean; - readonly has_downloads?: boolean; - readonly archived?: boolean; - readonly disabled?: boolean; - readonly visibility?: string; - readonly pushed_at?: string; - readonly created_at?: string; - readonly updated_at?: string; - readonly permissions?: { - readonly admin?: boolean; - readonly push?: boolean; - readonly pull?: boolean; - } & { readonly [key: string]: any }; - readonly allow_rebase_merge?: boolean; - readonly temp_clone_token?: string; - readonly allow_squash_merge?: boolean; - readonly delete_branch_on_merge?: boolean; - readonly allow_merge_commit?: boolean; - readonly subscribers_count?: number; - readonly network_count?: number; - } & { readonly [key: string]: any }) - | null; + readonly template_repository?: { + readonly id?: number; + readonly node_id?: string; + readonly name?: string; + readonly full_name?: string; + readonly owner?: { + readonly login?: string; + readonly id?: number; + readonly node_id?: string; + readonly avatar_url?: string; + readonly gravatar_id?: string; + readonly url?: string; + readonly html_url?: string; + readonly followers_url?: string; + readonly following_url?: string; + readonly gists_url?: string; + readonly starred_url?: string; + readonly subscriptions_url?: string; + readonly organizations_url?: string; + readonly repos_url?: string; + readonly events_url?: string; + readonly received_events_url?: string; + readonly type?: string; + readonly site_admin?: boolean; + }; + readonly private?: boolean; + readonly html_url?: string; + readonly description?: string; + readonly fork?: boolean; + readonly url?: string; + readonly archive_url?: string; + readonly assignees_url?: string; + readonly blobs_url?: string; + readonly branches_url?: string; + readonly collaborators_url?: string; + readonly comments_url?: string; + readonly commits_url?: string; + readonly compare_url?: string; + readonly contents_url?: string; + readonly contributors_url?: string; + readonly deployments_url?: string; + readonly downloads_url?: string; + readonly events_url?: string; + readonly forks_url?: string; + readonly git_commits_url?: string; + readonly git_refs_url?: string; + readonly git_tags_url?: string; + readonly git_url?: string; + readonly issue_comment_url?: string; + readonly issue_events_url?: string; + readonly issues_url?: string; + readonly keys_url?: string; + readonly labels_url?: string; + readonly languages_url?: string; + readonly merges_url?: string; + readonly milestones_url?: string; + readonly notifications_url?: string; + readonly pulls_url?: string; + readonly releases_url?: string; + readonly ssh_url?: string; + readonly stargazers_url?: string; + readonly statuses_url?: string; + readonly subscribers_url?: string; + readonly subscription_url?: string; + readonly tags_url?: string; + readonly teams_url?: string; + readonly trees_url?: string; + readonly clone_url?: string; + readonly mirror_url?: string; + readonly hooks_url?: string; + readonly svn_url?: string; + readonly homepage?: string; + readonly language?: string; + readonly forks_count?: number; + readonly stargazers_count?: number; + readonly watchers_count?: number; + readonly size?: number; + readonly default_branch?: string; + readonly open_issues_count?: number; + readonly is_template?: boolean; + readonly topics?: readonly string[]; + readonly has_issues?: boolean; + readonly has_projects?: boolean; + readonly has_wiki?: boolean; + readonly has_pages?: boolean; + readonly has_downloads?: boolean; + readonly archived?: boolean; + readonly disabled?: boolean; + readonly visibility?: string; + readonly pushed_at?: string; + readonly created_at?: string; + readonly updated_at?: string; + readonly permissions?: { + readonly admin?: boolean; + readonly push?: boolean; + readonly pull?: boolean; + }; + readonly allow_rebase_merge?: boolean; + readonly temp_clone_token?: string; + readonly allow_squash_merge?: boolean; + readonly delete_branch_on_merge?: boolean; + readonly allow_merge_commit?: boolean; + readonly subscribers_count?: number; + readonly network_count?: number; + } | null; readonly temp_clone_token?: string; /** Whether to allow squash merges for pull requests. */ readonly allow_squash_merge?: boolean; @@ -5559,7 +5553,7 @@ export interface components { readonly watchers: number; readonly master_branch?: string; readonly starred_at?: string; - } & { readonly [key: string]: any }; + }; /** Authentication token for a GitHub App installed on a user or org. */ readonly "installation-token": { readonly token: string; @@ -5569,28 +5563,26 @@ export interface components { readonly contents?: string; readonly metadata?: string; readonly single_file?: string; - } & { readonly [key: string]: any }; + }; readonly repository_selection?: "all" | "selected"; readonly repositories?: readonly components["schemas"]["repository"][]; readonly single_file?: string; readonly has_multiple_single_files?: boolean; readonly single_file_paths?: readonly string[]; - } & { readonly [key: string]: any }; + }; /** Validation Error */ readonly "validation-error": { readonly message: string; readonly documentation_url: string; - readonly errors?: readonly ({ + readonly errors?: readonly { readonly resource?: string; readonly field?: string; readonly message?: string; readonly code: string; readonly index?: number; - readonly value?: ((string | null) | (number | null) | (readonly string[] | null)) & { - readonly [key: string]: any; - }; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + readonly value?: (string | null) | (number | null) | (readonly string[] | null); + }[]; + }; /** The authorization associated with an OAuth Access. */ readonly "application-grant": { readonly id: number; @@ -5599,12 +5591,12 @@ export interface components { readonly client_id: string; readonly name: string; readonly url: string; - } & { readonly [key: string]: any }; + }; readonly created_at: string; readonly updated_at: string; readonly scopes: readonly string[]; - readonly user?: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; - } & { readonly [key: string]: any }; + readonly user?: components["schemas"]["simple-user"] | null; + }; readonly "scoped-installation": { readonly permissions: components["schemas"]["app-permissions"]; /** Describe whether all repositories have been selected or there's a selection involved */ @@ -5614,7 +5606,7 @@ export interface components { readonly single_file_paths?: readonly string[]; readonly repositories_url: string; readonly account: components["schemas"]["simple-user"]; - } & { readonly [key: string]: any }; + }; /** The authorization for an OAuth app, GitHub App, or a Personal Access Token. */ readonly authorization: { readonly id: number; @@ -5628,15 +5620,15 @@ export interface components { readonly client_id: string; readonly name: string; readonly url: string; - } & { readonly [key: string]: any }; + }; readonly note: string | null; readonly note_url: string | null; readonly updated_at: string; readonly created_at: string; readonly fingerprint: string | null; - readonly user?: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; - readonly installation?: (components["schemas"]["scoped-installation"] & { readonly [key: string]: any }) | null; - } & { readonly [key: string]: any }; + readonly user?: components["schemas"]["simple-user"] | null; + readonly installation?: components["schemas"]["scoped-installation"] | null; + }; /** Code Of Conduct */ readonly "code-of-conduct": { readonly key: string; @@ -5644,7 +5636,7 @@ export interface components { readonly url: string; readonly body?: string; readonly html_url: string | null; - } & { readonly [key: string]: any }; + }; /** Content Reference attachments allow you to provide context around URLs posted in comments */ readonly "content-reference-attachment": { /** The ID of the attachment */ @@ -5655,7 +5647,7 @@ export interface components { readonly body: string; /** The node_id of the content attachment */ readonly node_id?: string; - } & { readonly [key: string]: any }; + }; /** The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. */ readonly "enabled-organizations": "all" | "none" | "selected"; /** The permissions policy that controls the actions that are allowed to run. Can be one of: `all`, `local_only`, or `selected`. */ @@ -5668,7 +5660,7 @@ export interface components { readonly selected_organizations_url?: string; readonly allowed_actions: components["schemas"]["allowed-actions"]; readonly selected_actions_url?: components["schemas"]["selected-actions-url"]; - } & { readonly [key: string]: any }; + }; /** Organization Simple */ readonly "organization-simple": { readonly login: string; @@ -5683,7 +5675,7 @@ export interface components { readonly public_members_url: string; readonly avatar_url: string; readonly description: string | null; - } & { readonly [key: string]: any }; + }; readonly "selected-actions": { /** Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. */ readonly github_owned_allowed: boolean; @@ -5691,7 +5683,7 @@ export interface components { readonly verified_allowed: boolean; /** 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/*`." */ readonly patterns_allowed: readonly string[]; - } & { readonly [key: string]: any }; + }; readonly "runner-groups-enterprise": { readonly id: number; readonly name: string; @@ -5700,7 +5692,7 @@ export interface components { readonly selected_organizations_url?: string; readonly runners_url: string; readonly allows_public_repositories: boolean; - } & { readonly [key: string]: any }; + }; /** A self hosted runner */ readonly runner: { /** The id of the runner. */ @@ -5712,22 +5704,22 @@ export interface components { /** The status of the runner. */ readonly status: string; readonly busy: boolean; - readonly labels: readonly ({ + readonly labels: readonly { /** Unique identifier of the label. */ readonly id?: number; /** Name of the label. */ readonly name?: string; /** The type of label. Read-only labels are applied automatically when the runner is configured. */ readonly type?: "read-only" | "custom"; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; /** Runner Application */ readonly "runner-application": { readonly os: string; readonly architecture: string; readonly download_url: string; readonly filename: string; - } & { readonly [key: string]: any }; + }; /** Authentication Token */ readonly "authentication-token": { /** The token used for authentication */ @@ -5740,7 +5732,7 @@ export interface components { readonly single_file?: string | null; /** Describe whether all repositories have been selected or there's a selection involved */ readonly repository_selection?: "all" | "selected"; - } & { readonly [key: string]: any }; + }; readonly "audit-log-event": { /** The time the audit log event occurred, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). */ readonly "@timestamp"?: number; @@ -5788,7 +5780,7 @@ export interface components { readonly user?: string; /** The repository visibility, for example `public` or `private`. */ readonly visibility?: string; - } & { readonly [key: string]: any }; + }; readonly "actions-billing-usage": { /** The sum of the free and paid GitHub Actions minutes used. */ readonly total_minutes_used: number; @@ -5803,8 +5795,8 @@ export interface components { readonly MACOS?: number; /** Total minutes used on Windows runner machines. */ readonly WINDOWS?: number; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; readonly "packages-billing-usage": { /** Sum of the free and paid storage space (GB) for GitHuub Packages. */ readonly total_gigabytes_bandwidth_used: number; @@ -5812,7 +5804,7 @@ export interface components { readonly total_paid_gigabytes_bandwidth_used: number; /** Free storage space (GB) for GitHub Packages. */ readonly included_gigabytes_bandwidth: number; - } & { readonly [key: string]: any }; + }; readonly "combined-billing-usage": { /** Numbers of days left in billing cycle. */ readonly days_left_in_billing_cycle: number; @@ -5820,7 +5812,7 @@ export interface components { readonly estimated_paid_storage_for_month: number; /** Estimated sum of free and paid storage space (GB) used in billing cycle. */ readonly estimated_storage_for_month: number; - } & { readonly [key: string]: any }; + }; /** Actor */ readonly actor: { readonly id: number; @@ -5829,7 +5821,7 @@ export interface components { readonly gravatar_id: string | null; readonly url: string; readonly avatar_url: string; - } & { readonly [key: string]: any }; + }; /** Color-coded labels help you categorize and filter your issues (just like labels in Gmail). */ readonly label: { readonly id: number; @@ -5842,7 +5834,7 @@ export interface components { /** 6-character hex code, without the leading #, identifying the color */ readonly color: string; readonly default: boolean; - } & { readonly [key: string]: any }; + }; /** A collection of related issues and pull requests. */ readonly milestone: { readonly url: string; @@ -5857,14 +5849,14 @@ export interface components { /** The title of the milestone. */ readonly title: string; readonly description: string | null; - readonly creator: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly creator: components["schemas"]["simple-user"] | null; readonly open_issues: number; readonly closed_issues: number; readonly created_at: string; readonly updated_at: string; readonly closed_at: string | null; readonly due_on: string | null; - } & { readonly [key: string]: any }; + }; /** How the author is associated with the repository. */ readonly author_association: | "COLLABORATOR" @@ -5889,11 +5881,11 @@ export interface components { readonly state: string; readonly title: string; readonly body?: string; - readonly user: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly user: components["schemas"]["simple-user"] | null; readonly labels: readonly components["schemas"]["label"][]; - readonly assignee: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly assignee: components["schemas"]["simple-user"] | null; readonly assignees?: readonly components["schemas"]["simple-user"][] | null; - readonly milestone: (components["schemas"]["milestone"] & { readonly [key: string]: any }) | null; + readonly milestone: components["schemas"]["milestone"] | null; readonly locked: boolean; readonly active_lock_reason?: string | null; readonly comments: number; @@ -5903,7 +5895,7 @@ export interface components { readonly html_url: string | null; readonly patch_url: string | null; readonly url: string | null; - } & { readonly [key: string]: any }; + }; readonly closed_at: string | null; readonly created_at: string; readonly updated_at: string; @@ -5912,10 +5904,8 @@ export interface components { readonly body_text?: string; readonly timeline_url?: string; readonly repository?: components["schemas"]["repository"]; - readonly performed_via_github_app?: - | (components["schemas"]["integration"] & { readonly [key: string]: any }) - | null; - } & { readonly [key: string]: any }; + readonly performed_via_github_app?: components["schemas"]["integration"] | null; + }; readonly "reaction-rollup": { readonly url: string; readonly total_count: number; @@ -5927,7 +5917,7 @@ export interface components { readonly hooray: number; readonly eyes: number; readonly rocket: number; - } & { readonly [key: string]: any }; + }; /** Comments provide a way for people to collaborate on an issue. */ readonly "issue-comment": { /** Unique identifier of the issue comment */ @@ -5940,16 +5930,14 @@ export interface components { readonly body_text?: string; readonly body_html?: string; readonly html_url: string; - readonly user: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly user: components["schemas"]["simple-user"] | null; readonly created_at: string; readonly updated_at: string; readonly issue_url: string; readonly author_association: components["schemas"]["author_association"]; - readonly performed_via_github_app?: - | (components["schemas"]["integration"] & { readonly [key: string]: any }) - | null; + readonly performed_via_github_app?: components["schemas"]["integration"] | null; readonly reactions?: components["schemas"]["reaction-rollup"]; - } & { readonly [key: string]: any }; + }; /** Event */ readonly event: { readonly id: string; @@ -5959,29 +5947,29 @@ export interface components { readonly id: number; readonly name: string; readonly url: string; - } & { readonly [key: string]: any }; + }; readonly org?: components["schemas"]["actor"]; readonly payload: { readonly action: string; readonly issue?: components["schemas"]["issue-simple"]; readonly comment?: components["schemas"]["issue-comment"]; - readonly pages?: readonly ({ + readonly pages?: readonly { readonly page_name?: string; readonly title?: string; readonly summary?: string | null; readonly action?: string; readonly sha?: string; readonly html_url?: string; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; readonly public: boolean; readonly created_at: string | null; - } & { readonly [key: string]: any }; + }; /** Hypermedia Link with Type */ readonly "link-with-type": { readonly href: string; readonly type: string; - } & { readonly [key: string]: any }; + }; /** Feed */ readonly feed: { readonly timeline_url: string; @@ -6001,8 +5989,8 @@ export interface components { readonly current_user_actor?: components["schemas"]["link-with-type"]; readonly current_user_organization?: components["schemas"]["link-with-type"]; readonly current_user_organizations?: readonly components["schemas"]["link-with-type"][]; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** Base Gist */ readonly "base-gist": { readonly url: string; @@ -6020,20 +6008,20 @@ export interface components { readonly language?: string; readonly raw_url?: string; readonly size?: number; - } & { readonly [key: string]: any }; + }; }; readonly public: boolean; readonly created_at: string; readonly updated_at: string; readonly description: string | null; readonly comments: number; - readonly user: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly user: components["schemas"]["simple-user"] | null; readonly comments_url: string; - readonly owner?: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly owner?: components["schemas"]["simple-user"] | null; readonly truncated?: boolean; readonly forks?: readonly { readonly [key: string]: any }[]; readonly history?: readonly { readonly [key: string]: any }[]; - } & { readonly [key: string]: any }; + }; /** Gist Simple */ readonly "gist-simple": { readonly url?: string; @@ -6045,17 +6033,15 @@ export interface components { readonly git_push_url?: string; readonly html_url?: string; readonly files?: { - readonly [key: string]: - | ({ - readonly filename?: string; - readonly type?: string; - readonly language?: string; - readonly raw_url?: string; - readonly size?: number; - readonly truncated?: boolean; - readonly content?: string; - } & { readonly [key: string]: any }) - | null; + readonly [key: string]: { + readonly filename?: string; + readonly type?: string; + readonly language?: string; + readonly raw_url?: string; + readonly size?: number; + readonly truncated?: boolean; + readonly content?: string; + } | null; }; readonly public?: boolean; readonly created_at?: string; @@ -6066,7 +6052,7 @@ export interface components { readonly comments_url?: string; readonly owner?: components["schemas"]["simple-user"]; readonly truncated?: boolean; - } & { readonly [key: string]: any }; + }; /** A comment made to a gist. */ readonly "gist-comment": { readonly id: number; @@ -6074,28 +6060,28 @@ export interface components { readonly url: string; /** The comment text. */ readonly body: string; - readonly user: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly user: components["schemas"]["simple-user"] | null; readonly created_at: string; readonly updated_at: string; readonly author_association: components["schemas"]["author_association"]; - } & { readonly [key: string]: any }; + }; /** Gist Commit */ readonly "gist-commit": { readonly url: string; readonly version: string; - readonly user: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly user: components["schemas"]["simple-user"] | null; readonly change_status: { readonly total?: number; readonly additions?: number; readonly deletions?: number; - } & { readonly [key: string]: any }; + }; readonly committed_at: string; - } & { readonly [key: string]: any }; + }; /** Gitignore Template */ readonly "gitignore-template": { readonly name: string; readonly source: string; - } & { readonly [key: string]: any }; + }; /** Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. */ readonly issue: { readonly id: number; @@ -6115,11 +6101,11 @@ export interface components { readonly title: string; /** Contents of the issue */ readonly body?: string; - readonly user: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly user: components["schemas"]["simple-user"] | null; /** 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 */ - readonly labels: readonly (( + readonly labels: readonly ( | string - | ({ + | { readonly id?: number; readonly node_id?: string; readonly url?: string; @@ -6127,11 +6113,11 @@ export interface components { readonly description?: string | null; readonly color?: string | null; readonly default?: boolean; - } & { readonly [key: string]: any }) - ) & { readonly [key: string]: any })[]; - readonly assignee: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + } + )[]; + readonly assignee: components["schemas"]["simple-user"] | null; readonly assignees?: readonly components["schemas"]["simple-user"][] | null; - readonly milestone: (components["schemas"]["milestone"] & { readonly [key: string]: any }) | null; + readonly milestone: components["schemas"]["milestone"] | null; readonly locked: boolean; readonly active_lock_reason?: string | null; readonly comments: number; @@ -6141,21 +6127,19 @@ export interface components { readonly html_url: string | null; readonly patch_url: string | null; readonly url: string | null; - } & { readonly [key: string]: any }; + }; readonly closed_at: string | null; readonly created_at: string; readonly updated_at: string; - readonly closed_by?: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly closed_by?: components["schemas"]["simple-user"] | null; readonly body_html?: string; readonly body_text?: string; readonly timeline_url?: string; readonly repository?: components["schemas"]["repository"]; - readonly performed_via_github_app?: - | (components["schemas"]["integration"] & { readonly [key: string]: any }) - | null; + readonly performed_via_github_app?: components["schemas"]["integration"] | null; readonly author_association: components["schemas"]["author_association"]; readonly reactions?: components["schemas"]["reaction-rollup"]; - } & { readonly [key: string]: any }; + }; /** License */ readonly license: { readonly key: string; @@ -6171,7 +6155,7 @@ export interface components { readonly limitations: readonly string[]; readonly body: string; readonly featured: boolean; - } & { readonly [key: string]: any }; + }; /** Marketplace Listing Plan */ readonly "marketplace-listing-plan": { readonly url: string; @@ -6187,7 +6171,7 @@ export interface components { readonly unit_name: string | null; readonly state: string; readonly bullets: readonly string[]; - } & { readonly [key: string]: any }; + }; /** Marketplace Purchase */ readonly "marketplace-purchase": { readonly url: string; @@ -6195,15 +6179,13 @@ export interface components { readonly id: number; readonly login: string; readonly organization_billing_email?: string; - readonly marketplace_pending_change?: - | ({ - readonly is_installed?: boolean; - readonly effective_date?: string; - readonly unit_count?: number | null; - readonly id?: number; - readonly plan?: components["schemas"]["marketplace-listing-plan"]; - } & { readonly [key: string]: any }) - | null; + readonly marketplace_pending_change?: { + readonly is_installed?: boolean; + readonly effective_date?: string; + readonly unit_count?: number | null; + readonly id?: number; + readonly plan?: components["schemas"]["marketplace-listing-plan"]; + } | null; readonly marketplace_purchase: { readonly billing_cycle?: string; readonly next_billing_date?: string | null; @@ -6213,15 +6195,15 @@ export interface components { readonly free_trial_ends_on?: string | null; readonly updated_at?: string; readonly plan?: components["schemas"]["marketplace-listing-plan"]; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** Api Overview */ readonly "api-overview": { readonly verifiable_password_authentication: boolean; readonly ssh_key_fingerprints?: { readonly SHA256_RSA?: string; readonly SHA256_DSA?: string; - } & { readonly [key: string]: any }; + }; readonly hooks?: readonly string[]; readonly web?: readonly string[]; readonly api?: readonly string[]; @@ -6229,14 +6211,14 @@ export interface components { readonly pages?: readonly string[]; readonly importer?: readonly string[]; readonly actions?: readonly string[]; - } & { readonly [key: string]: any }; + }; /** Minimal Repository */ readonly "minimal-repository": { readonly id: number; readonly node_id: string; readonly name: string; readonly full_name: string; - readonly owner: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly owner: components["schemas"]["simple-user"] | null; readonly private: boolean; readonly html_url: string; readonly description: string | null; @@ -6308,25 +6290,23 @@ export interface components { readonly admin?: boolean; readonly push?: boolean; readonly pull?: boolean; - } & { readonly [key: string]: any }; - readonly template_repository?: (components["schemas"]["repository"] & { readonly [key: string]: any }) | null; + }; + readonly template_repository?: components["schemas"]["repository"] | null; readonly temp_clone_token?: string; readonly delete_branch_on_merge?: boolean; readonly subscribers_count?: number; readonly network_count?: number; - readonly license?: - | ({ - readonly key?: string; - readonly name?: string; - readonly spdx_id?: string; - readonly url?: string; - readonly node_id?: string; - } & { readonly [key: string]: any }) - | null; + readonly license?: { + readonly key?: string; + readonly name?: string; + readonly spdx_id?: string; + readonly url?: string; + readonly node_id?: string; + } | null; readonly forks?: number; readonly open_issues?: number; readonly watchers?: number; - } & { readonly [key: string]: any }; + }; /** Thread */ readonly thread: { readonly id: string; @@ -6336,14 +6316,14 @@ export interface components { readonly url: string; readonly latest_comment_url: string; readonly type: string; - } & { readonly [key: string]: any }; + }; readonly reason: string; readonly unread: boolean; readonly updated_at: string; readonly last_read_at: string | null; readonly url: string; readonly subscription_url: string; - } & { readonly [key: string]: any }; + }; /** Thread Subscription */ readonly "thread-subscription": { readonly subscribed: boolean; @@ -6353,7 +6333,7 @@ export interface components { readonly url: string; readonly thread_url?: string; readonly repository_url?: string; - } & { readonly [key: string]: any }; + }; /** Organization Full */ readonly "organization-full": { readonly login: string; @@ -6396,7 +6376,7 @@ export interface components { readonly private_repos: number; readonly filled_seats?: number; readonly seats?: number; - } & { readonly [key: string]: any }; + }; readonly default_repository_permission?: string | null; readonly members_can_create_repositories?: boolean | null; readonly two_factor_requirement_enabled?: boolean | null; @@ -6406,7 +6386,7 @@ export interface components { readonly members_can_create_internal_repositories?: boolean; readonly members_can_create_pages?: boolean; readonly updated_at: string; - } & { readonly [key: string]: any }; + }; /** The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. */ readonly "enabled-repositories": "all" | "none" | "selected"; readonly "actions-organization-permissions": { @@ -6415,7 +6395,7 @@ export interface components { readonly selected_repositories_url?: string; readonly allowed_actions: components["schemas"]["allowed-actions"]; readonly selected_actions_url?: components["schemas"]["selected-actions-url"]; - } & { readonly [key: string]: any }; + }; readonly "runner-groups-org": { readonly id: number; readonly name: string; @@ -6427,7 +6407,7 @@ export interface components { readonly inherited: boolean; readonly inherited_allows_public_repositories?: boolean; readonly allows_public_repositories: boolean; - } & { readonly [key: string]: any }; + }; /** Secrets for GitHub Actions for an organization. */ readonly "organization-actions-secret": { /** The name of the secret. */ @@ -6437,7 +6417,7 @@ export interface components { /** Visibility of a secret */ readonly visibility: "all" | "private" | "selected"; readonly selected_repositories_url?: string; - } & { readonly [key: string]: any }; + }; /** The public key used for setting Actions Secrets. */ readonly "actions-public-key": { /** The identifier for the key. */ @@ -6448,7 +6428,7 @@ export interface components { readonly url?: string; readonly title?: string; readonly created_at?: string; - } & { readonly [key: string]: any }; + }; /** Credential Authorization */ readonly "credential-authorization": { /** User login that owns the underlying credential. */ @@ -6472,7 +6452,7 @@ export interface components { readonly authorized_credential_title?: string | null; /** The note given to the token. This will only be present when the credential is a token. */ readonly authorized_credential_note?: string | null; - } & { readonly [key: string]: any }; + }; /** Organization Invitation */ readonly "organization-invitation": { readonly id: number; @@ -6487,7 +6467,7 @@ export interface components { readonly invitation_team_url: string; readonly node_id: string; readonly invitation_teams_url?: string; - } & { readonly [key: string]: any }; + }; /** Org Hook */ readonly "org-hook": { readonly id: number; @@ -6501,11 +6481,11 @@ export interface components { readonly insecure_ssl?: string; readonly content_type?: string; readonly secret?: string; - } & { readonly [key: string]: any }; + }; readonly updated_at: string; readonly created_at: string; readonly type: string; - } & { readonly [key: string]: any }; + }; /** 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`. */ readonly "interaction-group": "existing_users" | "contributors_only" | "collaborators_only"; /** Interaction limit settings. */ @@ -6513,38 +6493,36 @@ export interface components { readonly limit: components["schemas"]["interaction-group"]; readonly origin: string; readonly expires_at: string; - } & { readonly [key: string]: any }; + }; /** The duration of the interaction restriction. Can be one of: `one_day`, `three_days`, `one_week`, `one_month`, `six_months`. Default: `one_day`. */ readonly "interaction-expiry": "one_day" | "three_days" | "one_week" | "one_month" | "six_months"; /** Limit interactions to a specific type of user for a specified duration */ readonly "interaction-limit": { readonly limit: components["schemas"]["interaction-group"]; readonly expiry?: components["schemas"]["interaction-expiry"]; - } & { readonly [key: string]: any }; + }; /** Groups of organization members that gives permissions on specified repositories. */ - readonly "team-simple": - | ({ - /** Unique identifier of the team */ - readonly id: number; - readonly node_id: string; - /** URL for the team */ - readonly url: string; - readonly members_url: string; - /** Name of the team */ - readonly name: string; - /** Description of the team */ - readonly description: string | null; - /** Permission that the team will have for its repositories */ - readonly permission: string; - /** The level of privacy this team should have */ - readonly privacy?: string; - readonly html_url: string; - readonly repositories_url: string; - readonly slug: string; - /** Distinguished Name (DN) that team maps to within LDAP environment */ - readonly ldap_dn?: string; - } & { readonly [key: string]: any }) - | null; + readonly "team-simple": { + /** Unique identifier of the team */ + readonly id: number; + readonly node_id: string; + /** URL for the team */ + readonly url: string; + readonly members_url: string; + /** Name of the team */ + readonly name: string; + /** Description of the team */ + readonly description: string | null; + /** Permission that the team will have for its repositories */ + readonly permission: string; + /** The level of privacy this team should have */ + readonly privacy?: string; + readonly html_url: string; + readonly repositories_url: string; + readonly slug: string; + /** Distinguished Name (DN) that team maps to within LDAP environment */ + readonly ldap_dn?: string; + } | null; /** Groups of organization members that gives permissions on specified repositories. */ readonly team: { readonly id: number; @@ -6558,8 +6536,8 @@ export interface components { readonly html_url: string; readonly members_url: string; readonly repositories_url: string; - readonly parent?: (components["schemas"]["team-simple"] & { readonly [key: string]: any }) | null; - } & { readonly [key: string]: any }; + readonly parent?: components["schemas"]["team-simple"] | null; + }; /** Org Membership */ readonly "org-membership": { readonly url: string; @@ -6567,15 +6545,15 @@ export interface components { readonly role: string; readonly organization_url: string; readonly organization: components["schemas"]["organization-simple"]; - readonly user: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly user: components["schemas"]["simple-user"] | null; readonly permissions?: { readonly can_create_repository: boolean; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** A migration. */ readonly migration: { readonly id: number; - readonly owner: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly owner: components["schemas"]["simple-user"] | null; readonly guid: string; readonly state: string; readonly lock_repositories: boolean; @@ -6587,7 +6565,7 @@ export interface components { readonly node_id: string; readonly archive_url?: string; readonly exclude?: readonly { readonly [key: string]: any }[]; - } & { readonly [key: string]: any }; + }; /** A software package */ readonly package: { /** Unique identifier of the package. */ @@ -6600,11 +6578,11 @@ export interface components { /** The number of versions of the package. */ readonly version_count: number; readonly visibility: "private" | "public"; - readonly owner?: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; - readonly repository?: (components["schemas"]["minimal-repository"] & { readonly [key: string]: any }) | null; + readonly owner?: components["schemas"]["simple-user"] | null; + readonly repository?: components["schemas"]["minimal-repository"] | null; readonly created_at: string; readonly updated_at: string; - } & { readonly [key: string]: any }; + }; /** A version of a software package */ readonly "package-version": { /** Unique identifier of the package version. */ @@ -6623,12 +6601,12 @@ export interface components { readonly package_type: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container"; readonly container?: { readonly tags: readonly any[]; - } & { readonly [key: string]: any }; + }; readonly docker?: { readonly tag?: readonly any[]; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; + }; /** Projects are a way to organize columns and cards of work. */ readonly project: { readonly owner_url: string; @@ -6644,18 +6622,18 @@ export interface components { readonly number: number; /** State of the project; either 'open' or 'closed' */ readonly state: string; - readonly creator: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly creator: components["schemas"]["simple-user"] | null; readonly created_at: string; readonly updated_at: string; /** The baseline permission that all organization members have on this project. Only present if owner is an organization. */ readonly organization_permission?: "read" | "write" | "admin" | "none"; /** Whether or not this project can be seen by everyone. Only present if owner is an organization. */ readonly private?: boolean; - } & { readonly [key: string]: any }; + }; /** External Groups to be mapped to a team for membership */ readonly "group-mapping": { /** Array of groups to be mapped to this team */ - readonly groups?: readonly ({ + readonly groups?: readonly { /** The ID of the group */ readonly group_id: string; /** The name of the group */ @@ -6666,8 +6644,8 @@ export interface components { readonly status?: string; /** the time of the last sync for this group-mapping */ readonly synced_at?: string; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; /** Groups of organization members that gives permissions on specified repositories. */ readonly "team-full": { /** Unique identifier of the team */ @@ -6686,7 +6664,7 @@ export interface components { readonly permission: string; readonly members_url: string; readonly repositories_url: string; - readonly parent?: (components["schemas"]["team-simple"] & { readonly [key: string]: any }) | null; + readonly parent?: components["schemas"]["team-simple"] | null; readonly members_count: number; readonly repos_count: number; readonly created_at: string; @@ -6694,10 +6672,10 @@ export interface components { readonly organization: components["schemas"]["organization-full"]; /** Distinguished Name (DN) that team maps to within LDAP environment */ readonly ldap_dn?: string; - } & { readonly [key: string]: any }; + }; /** A team discussion is a persistent record of a free-form conversation within a team. */ readonly "team-discussion": { - readonly author: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly author: components["schemas"]["simple-user"] | null; /** The main text of the discussion. */ readonly body: string; readonly body_html: string; @@ -6721,10 +6699,10 @@ export interface components { readonly updated_at: string; readonly url: string; readonly reactions?: components["schemas"]["reaction-rollup"]; - } & { readonly [key: string]: any }; + }; /** A reply to a discussion within a team. */ readonly "team-discussion-comment": { - readonly author: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly author: components["schemas"]["simple-user"] | null; /** The main text of the comment. */ readonly body: string; readonly body_html: string; @@ -6740,23 +6718,23 @@ export interface components { readonly updated_at: string; readonly url: string; readonly reactions?: components["schemas"]["reaction-rollup"]; - } & { readonly [key: string]: any }; + }; /** Reactions to conversations provide a way to help people express their feelings more simply and effectively. */ readonly reaction: { readonly id: number; readonly node_id: string; - readonly user: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly user: components["schemas"]["simple-user"] | null; /** The reaction to use */ readonly content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; readonly created_at: string; - } & { readonly [key: string]: any }; + }; /** Team Membership */ readonly "team-membership": { readonly url: string; /** The role of the user in the team. */ readonly role: "member" | "maintainer"; readonly state: string; - } & { readonly [key: string]: any }; + }; /** A team's access to a project. */ readonly "team-project": { readonly owner_url: string; @@ -6780,8 +6758,8 @@ export interface components { readonly read: boolean; readonly write: boolean; readonly admin: boolean; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** A team's access to a repository. */ readonly "team-repository": { /** Unique identifier of the repository */ @@ -6790,7 +6768,7 @@ export interface components { /** The name of the repository. */ readonly name: string; readonly full_name: string; - readonly license: (components["schemas"]["license-simple"] & { readonly [key: string]: any }) | null; + readonly license: components["schemas"]["license-simple"] | null; readonly forks: number; readonly permissions?: { readonly admin: boolean; @@ -6798,8 +6776,8 @@ export interface components { readonly triage?: boolean; readonly push: boolean; readonly maintain?: boolean; - } & { readonly [key: string]: any }; - readonly owner: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + }; + readonly owner: components["schemas"]["simple-user"] | null; /** Whether the repository is private or public. */ readonly private: boolean; readonly html_url: string; @@ -6879,7 +6857,7 @@ export interface components { readonly updated_at: string | null; /** Whether to allow rebase merges for pull requests. */ readonly allow_rebase_merge?: boolean; - readonly template_repository?: (components["schemas"]["repository"] & { readonly [key: string]: any }) | null; + readonly template_repository?: components["schemas"]["repository"] | null; readonly temp_clone_token?: string; /** Whether to allow squash merges for pull requests. */ readonly allow_squash_merge?: boolean; @@ -6892,7 +6870,7 @@ export interface components { readonly open_issues: number; readonly watchers: number; readonly master_branch?: string; - } & { readonly [key: string]: any }; + }; /** Project cards represent a scope of work. */ readonly "project-card": { readonly url: string; @@ -6900,7 +6878,7 @@ export interface components { readonly id: number; readonly node_id: string; readonly note: string | null; - readonly creator: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly creator: components["schemas"]["simple-user"] | null; readonly created_at: string; readonly updated_at: string; /** Whether or not the card is archived */ @@ -6908,7 +6886,7 @@ export interface components { readonly column_url: string; readonly content_url?: string; readonly project_url: string; - } & { readonly [key: string]: any }; + }; /** Project columns contain cards of work. */ readonly "project-column": { readonly url: string; @@ -6921,17 +6899,17 @@ export interface components { readonly name: string; readonly created_at: string; readonly updated_at: string; - } & { readonly [key: string]: any }; + }; /** Repository Collaborator Permission */ readonly "repository-collaborator-permission": { readonly permission: string; - readonly user: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; - } & { readonly [key: string]: any }; + readonly user: components["schemas"]["simple-user"] | null; + }; readonly "rate-limit": { readonly limit: number; readonly remaining: number; readonly reset: number; - } & { readonly [key: string]: any }; + }; /** Rate Limit Overview */ readonly "rate-limit-overview": { readonly resources: { @@ -6941,23 +6919,23 @@ export interface components { readonly source_import?: components["schemas"]["rate-limit"]; readonly integration_manifest?: components["schemas"]["rate-limit"]; readonly code_scanning_upload?: components["schemas"]["rate-limit"]; - } & { readonly [key: string]: any }; + }; readonly rate: components["schemas"]["rate-limit"]; - } & { readonly [key: string]: any }; + }; /** Code of Conduct Simple */ readonly "code-of-conduct-simple": { readonly url: string; readonly key: string; readonly name: string; readonly html_url: string | null; - } & { readonly [key: string]: any }; + }; /** Full Repository */ readonly "full-repository": { readonly id: number; readonly node_id: string; readonly name: string; readonly full_name: string; - readonly owner: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly owner: components["schemas"]["simple-user"] | null; readonly private: boolean; readonly html_url: string; readonly description: string | null; @@ -7031,17 +7009,17 @@ export interface components { readonly admin: boolean; readonly pull: boolean; readonly push: boolean; - } & { readonly [key: string]: any }; + }; readonly allow_rebase_merge?: boolean; - readonly template_repository?: (components["schemas"]["repository"] & { readonly [key: string]: any }) | null; + readonly template_repository?: components["schemas"]["repository"] | null; readonly temp_clone_token?: string | null; readonly allow_squash_merge?: boolean; readonly delete_branch_on_merge?: boolean; readonly allow_merge_commit?: boolean; readonly subscribers_count: number; readonly network_count: number; - readonly license: (components["schemas"]["license-simple"] & { readonly [key: string]: any }) | null; - readonly organization?: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly license: components["schemas"]["license-simple"] | null; + readonly organization?: components["schemas"]["simple-user"] | null; readonly parent?: components["schemas"]["repository"]; readonly source?: components["schemas"]["repository"]; readonly forks: number; @@ -7051,7 +7029,7 @@ export interface components { /** Whether anonymous git access is allowed. */ readonly anonymous_access_enabled?: boolean; readonly code_of_conduct?: components["schemas"]["code-of-conduct-simple"]; - } & { readonly [key: string]: any }; + }; /** An artifact */ readonly artifact: { readonly id: number; @@ -7067,7 +7045,7 @@ export interface components { readonly created_at: string | null; readonly expires_at: string; readonly updated_at: string | null; - } & { readonly [key: string]: any }; + }; /** Information of a job execution in a workflow run */ readonly job: { /** The id of the job. */ @@ -7091,7 +7069,7 @@ export interface components { /** The name of the job. */ readonly name: string; /** Steps in this job. */ - readonly steps?: readonly ({ + readonly steps?: readonly { /** The phase of the lifecycle that the job is currently in. */ readonly status: "queued" | "in_progress" | "completed"; /** The outcome of the job. */ @@ -7103,16 +7081,16 @@ export interface components { readonly started_at?: string | null; /** The time that the job finished, in ISO 8601 format. */ readonly completed_at?: string | null; - } & { readonly [key: string]: any })[]; + }[]; readonly check_run_url: string; - } & { readonly [key: string]: any }; + }; /** Whether GitHub Actions is enabled on the repository. */ readonly "actions-enabled": boolean; readonly "actions-repository-permissions": { readonly enabled: components["schemas"]["actions-enabled"]; readonly allowed_actions: components["schemas"]["allowed-actions"]; readonly selected_actions_url?: components["schemas"]["selected-actions-url"]; - } & { readonly [key: string]: any }; + }; readonly "pull-request-minimal": { readonly id: number; readonly number: number; @@ -7124,8 +7102,8 @@ export interface components { readonly id: number; readonly url: string; readonly name: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; readonly base: { readonly ref: string; readonly sha: string; @@ -7133,28 +7111,24 @@ export interface components { readonly id: number; readonly url: string; readonly name: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; + }; /** Simple Commit */ readonly "simple-commit": { readonly id: string; readonly tree_id: string; readonly message: string; readonly timestamp: string; - readonly author: - | ({ - readonly name: string; - readonly email: string; - } & { readonly [key: string]: any }) - | null; - readonly committer: - | ({ - readonly name: string; - readonly email: string; - } & { readonly [key: string]: any }) - | null; - } & { readonly [key: string]: any }; + readonly author: { + readonly name: string; + readonly email: string; + } | null; + readonly committer: { + readonly name: string; + readonly email: string; + } | null; + }; /** An invocation of a workflow */ readonly "workflow-run": { /** The ID of the workflow run. */ @@ -7196,11 +7170,11 @@ export interface components { readonly repository: components["schemas"]["minimal-repository"]; readonly head_repository: components["schemas"]["minimal-repository"]; readonly head_repository_id?: number; - } & { readonly [key: string]: any }; + }; /** An entry in the reviews log for environment deployments */ readonly "environment-approvals": { /** The list of environments that were approved or rejected */ - readonly environments: readonly ({ + readonly environments: readonly { /** The id of the environment. */ readonly id?: number; readonly node_id?: string; @@ -7212,13 +7186,13 @@ export interface components { readonly created_at?: string; /** The time that the environment was last updated, in ISO 8601 format. */ readonly updated_at?: string; - } & { readonly [key: string]: any })[]; + }[]; /** Whether deployment to the environment(s) was approved or rejected */ readonly state: "approved" | "rejected"; readonly user: components["schemas"]["simple-user"]; /** The comment submitted with the deployment review */ readonly comment: string; - } & { readonly [key: string]: any }; + }; /** The type of reviewer. Must be one of: `User` or `Team` */ readonly "deployment-reviewer-type": "User" | "Team"; /** Details of a deployment that is waiting for protection rules to pass */ @@ -7231,7 +7205,7 @@ export interface components { readonly name?: string; readonly url?: string; readonly html_url?: string; - } & { readonly [key: string]: any }; + }; /** The set duration of the wait timer */ readonly wait_timer: number; /** The time that the wait timer began. */ @@ -7239,12 +7213,12 @@ export interface components { /** Whether the currently authenticated user can approve the deployment */ readonly current_user_can_approve: boolean; /** 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. */ - readonly reviewers: readonly ({ + readonly reviewers: readonly { readonly type?: components["schemas"]["deployment-reviewer-type"]; - readonly reviewer?: (Partial & - Partial) & { readonly [key: string]: any }; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + readonly reviewer?: Partial & + Partial; + }[]; + }; /** A request for a specific ref(branch,sha,tag) to be deployed */ readonly deployment: { readonly url: string; @@ -7261,7 +7235,7 @@ export interface components { /** Name for the target deployment environment. */ readonly environment: string; readonly description: string | null; - readonly creator: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly creator: components["schemas"]["simple-user"] | null; readonly created_at: string; readonly updated_at: string; readonly statuses_url: string; @@ -7270,35 +7244,33 @@ export interface components { readonly transient_environment?: boolean; /** Specifies if the given environment is one that end-users directly interact with. Default: false. */ readonly production_environment?: boolean; - readonly performed_via_github_app?: - | (components["schemas"]["integration"] & { readonly [key: string]: any }) - | null; - } & { readonly [key: string]: any }; + readonly performed_via_github_app?: components["schemas"]["integration"] | null; + }; /** Workflow Run Usage */ readonly "workflow-run-usage": { readonly billable: { readonly UBUNTU?: { readonly total_ms: number; readonly jobs: number; - } & { readonly [key: string]: any }; + }; readonly MACOS?: { readonly total_ms: number; readonly jobs: number; - } & { readonly [key: string]: any }; + }; readonly WINDOWS?: { readonly total_ms: number; readonly jobs: number; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; readonly run_duration_ms: number; - } & { readonly [key: string]: any }; + }; /** Set secrets for GitHub Actions. */ readonly "actions-secret": { /** The name of the secret. */ readonly name: string; readonly created_at: string; readonly updated_at: string; - } & { readonly [key: string]: any }; + }; /** A GitHub Actions workflow */ readonly workflow: { readonly id: number; @@ -7312,26 +7284,26 @@ export interface components { readonly html_url: string; readonly badge_url: string; readonly deleted_at?: string; - } & { readonly [key: string]: any }; + }; /** Workflow Usage */ readonly "workflow-usage": { readonly billable: { readonly UBUNTU?: { readonly total_ms?: number; - } & { readonly [key: string]: any }; + }; readonly MACOS?: { readonly total_ms?: number; - } & { readonly [key: string]: any }; + }; readonly WINDOWS?: { readonly total_ms?: number; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; + }; /** Protected Branch Admin Enforced */ readonly "protected-branch-admin-enforced": { readonly url: string; readonly enabled: boolean; - } & { readonly [key: string]: any }; + }; /** Protected Branch Pull Request Review */ readonly "protected-branch-pull-request-review": { readonly url?: string; @@ -7343,18 +7315,18 @@ export interface components { readonly url?: string; readonly users_url?: string; readonly teams_url?: string; - } & { readonly [key: string]: any }; + }; readonly dismiss_stale_reviews: boolean; readonly require_code_owner_reviews: boolean; readonly required_approving_review_count?: number; - } & { readonly [key: string]: any }; + }; /** Branch Restriction Policy */ readonly "branch-restriction-policy": { readonly url: string; readonly users_url: string; readonly teams_url: string; readonly apps_url: string; - readonly users: readonly ({ + readonly users: readonly { readonly login?: string; readonly id?: number; readonly node_id?: string; @@ -7373,8 +7345,8 @@ export interface components { readonly received_events_url?: string; readonly type?: string; readonly site_admin?: boolean; - } & { readonly [key: string]: any })[]; - readonly teams: readonly ({ + }[]; + readonly teams: readonly { readonly id?: number; readonly node_id?: string; readonly url?: string; @@ -7387,8 +7359,8 @@ export interface components { readonly members_url?: string; readonly repositories_url?: string; readonly parent?: string | null; - } & { readonly [key: string]: any })[]; - readonly apps: readonly ({ + }[]; + readonly apps: readonly { readonly id?: number; readonly slug?: string; readonly node_id?: string; @@ -7415,7 +7387,7 @@ export interface components { readonly organizations_url?: string; readonly received_events_url?: string; readonly type?: string; - } & { readonly [key: string]: any }; + }; readonly name?: string; readonly description?: string; readonly external_url?: string; @@ -7427,10 +7399,10 @@ export interface components { readonly contents?: string; readonly issues?: string; readonly single_file?: string; - } & { readonly [key: string]: any }; + }; readonly events?: readonly string[]; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; /** Branch Protection */ readonly "branch-protection": { readonly url?: string; @@ -7439,46 +7411,46 @@ export interface components { readonly enforcement_level: string; readonly contexts: readonly string[]; readonly contexts_url?: string; - } & { readonly [key: string]: any }; + }; readonly enforce_admins?: components["schemas"]["protected-branch-admin-enforced"]; readonly required_pull_request_reviews?: components["schemas"]["protected-branch-pull-request-review"]; readonly restrictions?: components["schemas"]["branch-restriction-policy"]; readonly required_linear_history?: { readonly enabled?: boolean; - } & { readonly [key: string]: any }; + }; readonly allow_force_pushes?: { readonly enabled?: boolean; - } & { readonly [key: string]: any }; + }; readonly allow_deletions?: { readonly enabled?: boolean; - } & { readonly [key: string]: any }; + }; readonly enabled: boolean; readonly name?: string; readonly protection_url?: string; - } & { readonly [key: string]: any }; + }; /** Short Branch */ readonly "short-branch": { readonly name: string; readonly commit: { readonly sha: string; readonly url: string; - } & { readonly [key: string]: any }; + }; readonly protected: boolean; readonly protection?: components["schemas"]["branch-protection"]; readonly protection_url?: string; - } & { readonly [key: string]: any }; + }; /** Metaproperties for Git author/committer information. */ readonly "git-user": { readonly name?: string; readonly email?: string; readonly date?: string; - } & { readonly [key: string]: any }; + }; readonly verification: { readonly verified: boolean; readonly reason: string; readonly payload: string | null; readonly signature: string | null; - } & { readonly [key: string]: any }; + }; /** Commit */ readonly commit: { readonly url: string; @@ -7488,29 +7460,29 @@ export interface components { readonly comments_url: string; readonly commit: { readonly url: string; - readonly author: (components["schemas"]["git-user"] & { readonly [key: string]: any }) | null; - readonly committer: (components["schemas"]["git-user"] & { readonly [key: string]: any }) | null; + readonly author: components["schemas"]["git-user"] | null; + readonly committer: components["schemas"]["git-user"] | null; readonly message: string; readonly comment_count: number; readonly tree: { readonly sha: string; readonly url: string; - } & { readonly [key: string]: any }; + }; readonly verification?: components["schemas"]["verification"]; - } & { readonly [key: string]: any }; - readonly author: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; - readonly committer: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; - readonly parents: readonly ({ + }; + readonly author: components["schemas"]["simple-user"] | null; + readonly committer: components["schemas"]["simple-user"] | null; + readonly parents: readonly { readonly sha: string; readonly url: string; readonly html_url?: string; - } & { readonly [key: string]: any })[]; + }[]; readonly stats?: { readonly additions?: number; readonly deletions?: number; readonly total?: number; - } & { readonly [key: string]: any }; - readonly files?: readonly ({ + }; + readonly files?: readonly { readonly filename?: string; readonly additions?: number; readonly deletions?: number; @@ -7522,8 +7494,8 @@ export interface components { readonly sha?: string; readonly contents_url?: string; readonly previous_filename?: string; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; /** Branch With Protection */ readonly "branch-with-protection": { readonly name: string; @@ -7531,20 +7503,20 @@ export interface components { readonly _links: { readonly html: string; readonly self: string; - } & { readonly [key: string]: any }; + }; readonly protected: boolean; readonly protection: components["schemas"]["branch-protection"]; readonly protection_url: string; readonly pattern?: string; readonly required_approving_review_count?: number; - } & { readonly [key: string]: any }; + }; /** Status Check Policy */ readonly "status-check-policy": { readonly url: string; readonly strict: boolean; readonly contexts: readonly string[]; readonly contexts_url: string; - } & { readonly [key: string]: any }; + }; /** Branch protections protect branches */ readonly "protected-branch": { readonly url: string; @@ -7560,12 +7532,12 @@ export interface components { readonly teams_url: string; readonly users: readonly components["schemas"]["simple-user"][]; readonly teams: readonly components["schemas"]["team"][]; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; readonly required_signatures?: { readonly url: string; readonly enabled: boolean; - } & { readonly [key: string]: any }; + }; readonly enforce_admins?: { readonly url: string; readonly enabled: boolean; @@ -7580,7 +7552,7 @@ export interface components { readonly enabled: boolean; }; readonly restrictions?: components["schemas"]["branch-restriction-policy"]; - } & { readonly [key: string]: any }; + }; /** A deployment created as the result of an Actions check run from a workflow that references an environment */ readonly "deployment-simple": { readonly url: string; @@ -7601,10 +7573,8 @@ export interface components { readonly transient_environment?: boolean; /** Specifies if the given environment is one that end-users directly interact with. Default: false. */ readonly production_environment?: boolean; - readonly performed_via_github_app?: - | (components["schemas"]["integration"] & { readonly [key: string]: any }) - | null; - } & { readonly [key: string]: any }; + readonly performed_via_github_app?: components["schemas"]["integration"] | null; + }; /** A check performed on the code of a given code change */ readonly "check-run": { /** The id of the check. */ @@ -7629,18 +7599,16 @@ export interface components { readonly text: string | null; readonly annotations_count: number; readonly annotations_url: string; - } & { readonly [key: string]: any }; + }; /** The name of the check. */ readonly name: string; - readonly check_suite: - | ({ - readonly id: number; - } & { readonly [key: string]: any }) - | null; - readonly app: (components["schemas"]["integration"] & { readonly [key: string]: any }) | null; + readonly check_suite: { + readonly id: number; + } | null; + readonly app: components["schemas"]["integration"] | null; readonly pull_requests: readonly components["schemas"]["pull-request-minimal"][]; readonly deployment?: components["schemas"]["deployment-simple"]; - } & { readonly [key: string]: any }; + }; /** Check Annotation */ readonly "check-annotation": { readonly path: string; @@ -7653,7 +7621,7 @@ export interface components { readonly message: string | null; readonly raw_details: string | null; readonly blob_href: string; - } & { readonly [key: string]: any }; + }; /** A suite of checks performed on the code of a given code change */ readonly "check-suite": { readonly id: number; @@ -7669,24 +7637,24 @@ export interface components { readonly before: string | null; readonly after: string | null; readonly pull_requests: readonly components["schemas"]["pull-request-minimal"][] | null; - readonly app: (components["schemas"]["integration"] & { readonly [key: string]: any }) | null; + readonly app: components["schemas"]["integration"] | null; readonly repository: components["schemas"]["minimal-repository"]; readonly created_at: string | null; readonly updated_at: string | null; readonly head_commit: components["schemas"]["simple-commit"]; readonly latest_check_runs_count: number; readonly check_runs_url: string; - } & { readonly [key: string]: any }; + }; /** Check suite configuration preferences for a repository. */ readonly "check-suite-preference": { readonly preferences: { - readonly auto_trigger_checks?: readonly ({ + readonly auto_trigger_checks?: readonly { readonly app_id: number; readonly setting: boolean; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; readonly repository: components["schemas"]["repository"]; - } & { readonly [key: string]: any }; + }; /** The name of the tool used to generate the code scanning analysis. */ readonly "code-scanning-analysis-tool-name": string; /** The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ @@ -7718,14 +7686,14 @@ export interface components { readonly severity?: ("none" | "note" | "warning" | "error") | null; /** A short description of the rule used to detect the alert. */ readonly description?: string; - } & { readonly [key: string]: any }; + }; /** The version of the tool used to generate the code scanning analysis. */ readonly "code-scanning-analysis-tool-version": string | null; readonly "code-scanning-analysis-tool": { readonly name?: components["schemas"]["code-scanning-analysis-tool-name"]; readonly version?: components["schemas"]["code-scanning-analysis-tool-version"]; readonly guid?: components["schemas"]["code-scanning-analysis-tool-guid"]; - } & { readonly [key: string]: any }; + }; /** Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name. */ readonly "code-scanning-analysis-analysis-key": string; /** 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. */ @@ -7737,7 +7705,7 @@ export interface components { readonly end_line?: number; readonly start_column?: number; readonly end_column?: number; - } & { readonly [key: string]: any }; + }; /** A classification of the file. For example to identify it as generated. */ readonly "code-scanning-alert-classification": ("source" | "generated" | "test" | "library") | null; readonly "code-scanning-alert-instance": { @@ -7748,7 +7716,7 @@ export interface components { readonly commit_sha?: string; readonly message?: { readonly text?: string; - } & { readonly [key: string]: any }; + }; readonly location?: components["schemas"]["code-scanning-alert-location"]; readonly html_url?: string; /** @@ -7756,7 +7724,7 @@ export interface components { * For example identifying it as documentation, or a generated file. */ readonly classifications?: readonly components["schemas"]["code-scanning-alert-classification"][]; - } & { readonly [key: string]: any }; + }; readonly "code-scanning-alert-items": { readonly number: components["schemas"]["alert-number"]; readonly created_at: components["schemas"]["alert-created-at"]; @@ -7770,7 +7738,7 @@ export interface components { readonly rule: components["schemas"]["code-scanning-alert-rule-summary"]; readonly tool: components["schemas"]["code-scanning-analysis-tool"]; readonly most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; - } & { readonly [key: string]: any }; + }; readonly "code-scanning-alert-rule": { /** A unique identifier for the rule used to detect the alert. */ readonly id?: string | null; @@ -7786,7 +7754,7 @@ export interface components { readonly tags?: readonly string[]; /** Detailed documentation for the rule as GitHub Flavored Markdown. */ readonly help?: string; - } & { readonly [key: string]: any }; + }; readonly "code-scanning-alert": { readonly number: components["schemas"]["alert-number"]; readonly created_at: components["schemas"]["alert-created-at"]; @@ -7800,7 +7768,7 @@ export interface components { readonly rule: components["schemas"]["code-scanning-alert-rule"]; readonly tool: components["schemas"]["code-scanning-analysis-tool"]; readonly most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; - } & { readonly [key: string]: any }; + }; /** 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`. */ readonly "code-scanning-alert-set-state": "open" | "dismissed"; /** An identifier for the upload. */ @@ -7830,14 +7798,14 @@ export interface components { readonly sarif_id: components["schemas"]["code-scanning-analysis-sarif-id"]; readonly tool: components["schemas"]["code-scanning-analysis-tool"]; readonly deletable: boolean; - } & { readonly [key: string]: any }; + }; /** Successful deletion of a code scanning analysis */ readonly "code-scanning-analysis-deletion": { /** Next deletable analysis in chain, without last analysis deletion confirmation */ readonly next_analysis_url: string | null; /** Next deletable analysis in chain, with last analysis deletion confirmation */ readonly confirm_delete_url: string | null; - } & { readonly [key: string]: any }; + }; /** Scim Error */ readonly "scim-error": { readonly message?: string | null; @@ -7846,20 +7814,20 @@ export interface components { readonly status?: number; readonly scimType?: string | null; readonly schemas?: readonly string[]; - } & { readonly [key: string]: any }; + }; /** 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/github/finding-security-vulnerabilities-and-errors-in-your-code/sarif-support-for-code-scanning)." */ readonly "code-scanning-analysis-sarif-file": string; readonly "code-scanning-sarifs-receipt": { readonly id?: components["schemas"]["code-scanning-analysis-sarif-id"]; /** The REST API URL for checking the status of the upload. */ readonly url?: string; - } & { readonly [key: string]: any }; + }; readonly "code-scanning-sarifs-status": { /** `pending` files have not yet been processed, while `complete` means all results in the SARIF have been stored. */ readonly processing_status?: "pending" | "complete"; /** The REST API URL for getting the analyses associated with the upload. */ readonly analyses_url?: string | null; - } & { readonly [key: string]: any }; + }; /** Collaborator */ readonly collaborator: { readonly login: string; @@ -7884,15 +7852,15 @@ export interface components { readonly pull: boolean; readonly push: boolean; readonly admin: boolean; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** Repository invitations let you manage who you collaborate with. */ readonly "repository-invitation": { /** Unique identifier of the repository invitation. */ readonly id: number; readonly repository: components["schemas"]["minimal-repository"]; - readonly invitee: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; - readonly inviter: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly invitee: components["schemas"]["simple-user"] | null; + readonly inviter: components["schemas"]["simple-user"] | null; /** The permission associated with the invitation. */ readonly permissions: "read" | "write" | "admin"; readonly created_at: string; @@ -7902,7 +7870,7 @@ export interface components { readonly url: string; readonly html_url: string; readonly node_id: string; - } & { readonly [key: string]: any }; + }; /** Commit Comment */ readonly "commit-comment": { readonly html_url: string; @@ -7914,37 +7882,35 @@ export interface components { readonly position: number | null; readonly line: number | null; readonly commit_id: string; - readonly user: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly user: components["schemas"]["simple-user"] | null; readonly created_at: string; readonly updated_at: string; readonly author_association: components["schemas"]["author_association"]; readonly reactions?: components["schemas"]["reaction-rollup"]; - } & { readonly [key: string]: any }; + }; /** Branch Short */ readonly "branch-short": { readonly name: string; readonly commit: { readonly sha: string; readonly url: string; - } & { readonly [key: string]: any }; + }; readonly protected: boolean; - } & { readonly [key: string]: any }; + }; /** Hypermedia Link */ readonly link: { readonly href: string; - } & { readonly [key: string]: any }; + }; /** The status of auto merging a pull request. */ - readonly auto_merge: - | ({ - readonly enabled_by: components["schemas"]["simple-user"]; - /** The merge method to use. */ - readonly merge_method: "merge" | "squash" | "rebase"; - /** Title for the merge commit message. */ - readonly commit_title: string; - /** Commit message for the merge commit. */ - readonly commit_message: string; - } & { readonly [key: string]: any }) - | null; + readonly auto_merge: { + readonly enabled_by: components["schemas"]["simple-user"]; + /** The merge method to use. */ + readonly merge_method: "merge" | "squash" | "rebase"; + /** Title for the merge commit message. */ + readonly commit_title: string; + /** Commit message for the merge commit. */ + readonly commit_message: string; + } | null; /** Pull Request Simple */ readonly "pull-request-simple": { readonly url: string; @@ -7963,9 +7929,9 @@ export interface components { readonly state: string; readonly locked: boolean; readonly title: string; - readonly user: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly user: components["schemas"]["simple-user"] | null; readonly body: string | null; - readonly labels: readonly ({ + readonly labels: readonly { readonly id?: number; readonly node_id?: string; readonly url?: string; @@ -7973,15 +7939,15 @@ export interface components { readonly description?: string; readonly color?: string; readonly default?: boolean; - } & { readonly [key: string]: any })[]; - readonly milestone: (components["schemas"]["milestone"] & { readonly [key: string]: any }) | null; + }[]; + readonly milestone: components["schemas"]["milestone"] | null; readonly active_lock_reason?: string | null; readonly created_at: string; readonly updated_at: string; readonly closed_at: string | null; readonly merged_at: string | null; readonly merge_commit_sha: string | null; - readonly assignee: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly assignee: components["schemas"]["simple-user"] | null; readonly assignees?: readonly components["schemas"]["simple-user"][] | null; readonly requested_reviewers?: readonly components["schemas"]["simple-user"][] | null; readonly requested_teams?: readonly components["schemas"]["team-simple"][] | null; @@ -7990,15 +7956,15 @@ export interface components { readonly ref: string; readonly repo: components["schemas"]["repository"]; readonly sha: string; - readonly user: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; - } & { readonly [key: string]: any }; + readonly user: components["schemas"]["simple-user"] | null; + }; readonly base: { readonly label: string; readonly ref: string; readonly repo: components["schemas"]["repository"]; readonly sha: string; - readonly user: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; - } & { readonly [key: string]: any }; + readonly user: components["schemas"]["simple-user"] | null; + }; readonly _links: { readonly comments: components["schemas"]["link"]; readonly commits: components["schemas"]["link"]; @@ -8008,12 +7974,12 @@ export interface components { readonly review_comments: components["schemas"]["link"]; readonly review_comment: components["schemas"]["link"]; readonly self: components["schemas"]["link"]; - } & { readonly [key: string]: any }; + }; readonly author_association: components["schemas"]["author_association"]; readonly auto_merge: components["schemas"]["auto_merge"]; /** Indicates whether or not the pull request is a draft. */ readonly draft?: boolean; - } & { readonly [key: string]: any }; + }; readonly "simple-commit-status": { readonly description: string | null; readonly id: number; @@ -8026,7 +7992,7 @@ export interface components { readonly url: string; readonly created_at: string; readonly updated_at: string; - } & { readonly [key: string]: any }; + }; /** Combined Commit Status */ readonly "combined-commit-status": { readonly state: string; @@ -8036,7 +8002,7 @@ export interface components { readonly repository: components["schemas"]["minimal-repository"]; readonly commit_url: string; readonly url: string; - } & { readonly [key: string]: any }; + }; /** The status of a commit. */ readonly status: { readonly url: string; @@ -8050,35 +8016,27 @@ export interface components { readonly created_at: string; readonly updated_at: string; readonly creator: components["schemas"]["simple-user"]; - } & { readonly [key: string]: any }; + }; readonly "community-health-file": { readonly url: string; readonly html_url: string; - } & { readonly [key: string]: any }; + }; /** Community Profile */ readonly "community-profile": { readonly health_percentage: number; readonly description: string | null; readonly documentation: string | null; readonly files: { - readonly code_of_conduct: - | (components["schemas"]["code-of-conduct-simple"] & { readonly [key: string]: any }) - | null; - readonly license: (components["schemas"]["license-simple"] & { readonly [key: string]: any }) | null; - readonly contributing: - | (components["schemas"]["community-health-file"] & { readonly [key: string]: any }) - | null; - readonly readme: (components["schemas"]["community-health-file"] & { readonly [key: string]: any }) | null; - readonly issue_template: - | (components["schemas"]["community-health-file"] & { readonly [key: string]: any }) - | null; - readonly pull_request_template: - | (components["schemas"]["community-health-file"] & { readonly [key: string]: any }) - | null; - } & { readonly [key: string]: any }; + readonly code_of_conduct: components["schemas"]["code-of-conduct-simple"] | null; + readonly license: components["schemas"]["license-simple"] | null; + readonly contributing: components["schemas"]["community-health-file"] | null; + readonly readme: components["schemas"]["community-health-file"] | null; + readonly issue_template: components["schemas"]["community-health-file"] | null; + readonly pull_request_template: components["schemas"]["community-health-file"] | null; + }; readonly updated_at: string | null; readonly content_reports_enabled?: boolean; - } & { readonly [key: string]: any }; + }; /** Diff Entry */ readonly "diff-entry": { readonly sha: string; @@ -8092,7 +8050,7 @@ export interface components { readonly contents_url: string; readonly patch?: string; readonly previous_filename?: string; - } & { readonly [key: string]: any }; + }; /** Commit Comparison */ readonly "commit-comparison": { readonly url: string; @@ -8108,7 +8066,7 @@ export interface components { readonly total_commits: number; readonly commits: readonly components["schemas"]["commit"][]; readonly files: readonly components["schemas"]["diff-entry"][]; - } & { readonly [key: string]: any }; + }; /** Content Tree */ readonly "content-tree": { readonly type: string; @@ -8120,7 +8078,7 @@ export interface components { readonly git_url: string | null; readonly html_url: string | null; readonly download_url: string | null; - readonly entries?: readonly ({ + readonly entries?: readonly { readonly type: string; readonly size: number; readonly name: string; @@ -8135,16 +8093,16 @@ export interface components { readonly git: string | null; readonly html: string | null; readonly self: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any })[]; + }; + }[]; readonly _links: { readonly git: string | null; readonly html: string | null; readonly self: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** A list of directory items */ - readonly "content-directory": readonly ({ + readonly "content-directory": readonly { readonly type: string; readonly size: number; readonly name: string; @@ -8159,8 +8117,8 @@ export interface components { readonly git: string | null; readonly html: string | null; readonly self: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any })[]; + }; + }[]; /** Content File */ readonly "content-file": { readonly type: string; @@ -8178,10 +8136,10 @@ export interface components { readonly git: string | null; readonly html: string | null; readonly self: string; - } & { readonly [key: string]: any }; + }; readonly target?: string; readonly submodule_git_url?: string; - } & { readonly [key: string]: any }; + }; /** An object describing a symlink */ readonly "content-symlink": { readonly type: string; @@ -8198,8 +8156,8 @@ export interface components { readonly git: string | null; readonly html: string | null; readonly self: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** An object describing a symlink */ readonly "content-submodule": { readonly type: string; @@ -8216,28 +8174,26 @@ export interface components { readonly git: string | null; readonly html: string | null; readonly self: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** File Commit */ readonly "file-commit": { - readonly content: - | ({ - readonly name?: string; - readonly path?: string; - readonly sha?: string; - readonly size?: number; - readonly url?: string; - readonly html_url?: string; - readonly git_url?: string; - readonly download_url?: string; - readonly type?: string; - readonly _links?: { - readonly self?: string; - readonly git?: string; - readonly html?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }) - | null; + readonly content: { + readonly name?: string; + readonly path?: string; + readonly sha?: string; + readonly size?: number; + readonly url?: string; + readonly html_url?: string; + readonly git_url?: string; + readonly download_url?: string; + readonly type?: string; + readonly _links?: { + readonly self?: string; + readonly git?: string; + readonly html?: string; + }; + } | null; readonly commit: { readonly sha?: string; readonly node_id?: string; @@ -8247,30 +8203,30 @@ export interface components { readonly date?: string; readonly name?: string; readonly email?: string; - } & { readonly [key: string]: any }; + }; readonly committer?: { readonly date?: string; readonly name?: string; readonly email?: string; - } & { readonly [key: string]: any }; + }; readonly message?: string; readonly tree?: { readonly url?: string; readonly sha?: string; - } & { readonly [key: string]: any }; - readonly parents?: readonly ({ + }; + readonly parents?: readonly { readonly url?: string; readonly html_url?: string; readonly sha?: string; - } & { readonly [key: string]: any })[]; + }[]; readonly verification?: { readonly verified?: boolean; readonly reason?: string; readonly signature?: string | null; readonly payload?: string | null; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; + }; /** Contributor */ readonly contributor: { readonly login?: string; @@ -8294,7 +8250,7 @@ export interface components { readonly contributions: number; readonly email?: string; readonly name?: string; - } & { readonly [key: string]: any }; + }; /** The status of a deployment. */ readonly "deployment-status": { readonly url: string; @@ -8302,7 +8258,7 @@ export interface components { readonly node_id: string; /** The state of the status. */ readonly state: "error" | "failure" | "inactive" | "pending" | "success" | "queued" | "in_progress"; - readonly creator: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly creator: components["schemas"]["simple-user"] | null; /** A short description of the status. */ readonly description: string; /** The environment of the deployment that the status is for. */ @@ -8317,21 +8273,17 @@ export interface components { readonly environment_url?: string; /** The URL to associate with this status. */ readonly log_url?: string; - readonly performed_via_github_app?: - | (components["schemas"]["integration"] & { readonly [key: string]: any }) - | null; - } & { readonly [key: string]: any }; + readonly performed_via_github_app?: components["schemas"]["integration"] | null; + }; /** 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). */ readonly "wait-timer": number; /** The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. */ - readonly deployment_branch_policy: - | ({ - /** 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`. */ - readonly protected_branches: boolean; - /** 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`. */ - readonly custom_branch_policies: boolean; - } & { readonly [key: string]: any }) - | null; + readonly deployment_branch_policy: { + /** 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`. */ + readonly protected_branches: boolean; + /** 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`. */ + readonly custom_branch_policies: boolean; + } | null; /** Details of a deployment environment */ readonly environment: { /** The id of the environment. */ @@ -8345,41 +8297,35 @@ export interface components { readonly created_at: string; /** The time that the environment was last updated, in ISO 8601 format. */ readonly updated_at: string; - readonly protection_rules?: readonly ((Partial< - { + readonly protection_rules?: readonly (Partial<{ + readonly id: number; + readonly node_id: string; + readonly type: string; + readonly wait_timer?: components["schemas"]["wait-timer"]; + }> & + Partial<{ readonly id: number; readonly node_id: string; readonly type: string; - readonly wait_timer?: components["schemas"]["wait-timer"]; - } & { readonly [key: string]: any } - > & - Partial< - { - readonly id: number; - readonly node_id: string; - readonly type: string; - /** 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. */ - readonly reviewers?: readonly ({ - readonly type?: components["schemas"]["deployment-reviewer-type"]; - readonly reviewer?: (Partial & - Partial) & { readonly [key: string]: any }; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any } - > & - Partial< - { - readonly id: number; - readonly node_id: string; - readonly type: string; - } & { readonly [key: string]: any } - >) & { readonly [key: string]: any })[]; + /** 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. */ + readonly reviewers?: readonly { + readonly type?: components["schemas"]["deployment-reviewer-type"]; + readonly reviewer?: Partial & + Partial; + }[]; + }> & + Partial<{ + readonly id: number; + readonly node_id: string; + readonly type: string; + }>)[]; readonly deployment_branch_policy?: components["schemas"]["deployment_branch_policy"]; - } & { readonly [key: string]: any }; + }; /** Short Blob */ readonly "short-blob": { readonly url: string; readonly sha: string; - } & { readonly [key: string]: any }; + }; /** Blob */ readonly blob: { readonly content: string; @@ -8389,7 +8335,7 @@ export interface components { readonly size: number | null; readonly node_id: string; readonly highlighted_content?: string; - } & { readonly [key: string]: any }; + }; /** Low-level Git commit operations within a repository */ readonly "git-commit": { /** SHA for the commit */ @@ -8404,7 +8350,7 @@ export interface components { readonly email: string; /** Name of the git user */ readonly name: string; - } & { readonly [key: string]: any }; + }; /** Identifying information for the git-user */ readonly committer: { /** Timestamp of the commit */ @@ -8413,28 +8359,28 @@ export interface components { readonly email: string; /** Name of the git user */ readonly name: string; - } & { readonly [key: string]: any }; + }; /** Message describing the purpose of the commit */ readonly message: string; readonly tree: { /** SHA for the commit */ readonly sha: string; readonly url: string; - } & { readonly [key: string]: any }; - readonly parents: readonly ({ + }; + readonly parents: readonly { /** SHA for the commit */ readonly sha: string; readonly url: string; readonly html_url: string; - } & { readonly [key: string]: any })[]; + }[]; readonly verification: { readonly verified: boolean; readonly reason: string; readonly signature: string | null; readonly payload: string | null; - } & { readonly [key: string]: any }; + }; readonly html_url: string; - } & { readonly [key: string]: any }; + }; /** Git references within a repository */ readonly "git-ref": { readonly ref: string; @@ -8445,8 +8391,8 @@ export interface components { /** SHA for the reference */ readonly sha: string; readonly url: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** Metadata for a Git tag */ readonly "git-tag": { readonly node_id: string; @@ -8461,34 +8407,34 @@ export interface components { readonly date: string; readonly email: string; readonly name: string; - } & { readonly [key: string]: any }; + }; readonly object: { readonly sha: string; readonly type: string; readonly url: string; - } & { readonly [key: string]: any }; + }; readonly verification?: components["schemas"]["verification"]; - } & { readonly [key: string]: any }; + }; /** The hierarchy between files in a Git repository. */ readonly "git-tree": { readonly sha: string; readonly url: string; readonly truncated: boolean; /** Objects specifying a tree structure */ - readonly tree: readonly ({ + readonly tree: readonly { readonly path?: string; readonly mode?: string; readonly type?: string; readonly sha?: string; readonly size?: number; readonly url?: string; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; readonly "hook-response": { readonly code: number | null; readonly status: string | null; readonly message: string | null; - } & { readonly [key: string]: any }; + }; /** Webhooks for repositories. */ readonly hook: { readonly type: string; @@ -8511,14 +8457,14 @@ export interface components { readonly digest?: string; readonly secret?: components["schemas"]["webhook-config-secret"]; readonly token?: string; - } & { readonly [key: string]: any }; + }; readonly updated_at: string; readonly created_at: string; readonly url: string; readonly test_url: string; readonly ping_url: string; readonly last_response: components["schemas"]["hook-response"]; - } & { readonly [key: string]: any }; + }; /** A repository import from an external source. */ readonly import: { readonly vcs: string | null; @@ -8553,11 +8499,11 @@ export interface components { readonly has_large_files?: boolean; readonly large_files_size?: number; readonly large_files_count?: number; - readonly project_choices?: readonly ({ + readonly project_choices?: readonly { readonly vcs?: string; readonly tfvc_project?: string; readonly human_name?: string; - } & { readonly [key: string]: any })[]; + }[]; readonly message?: string; readonly authors_count?: number | null; readonly url: string; @@ -8565,7 +8511,7 @@ export interface components { readonly authors_url: string; readonly repository_url: string; readonly svn_root?: string; - } & { readonly [key: string]: any }; + }; /** Porter Author */ readonly "porter-author": { readonly id: number; @@ -8575,29 +8521,29 @@ export interface components { readonly name: string; readonly url: string; readonly import_url: string; - } & { readonly [key: string]: any }; + }; /** Porter Large File */ readonly "porter-large-file": { readonly ref_name: string; readonly path: string; readonly oid: string; readonly size: number; - } & { readonly [key: string]: any }; + }; /** Issue Event Label */ readonly "issue-event-label": { readonly name: string | null; readonly color: string | null; - } & { readonly [key: string]: any }; + }; readonly "issue-event-dismissed-review": { readonly state: string; readonly review_id: number; readonly dismissal_message: string | null; readonly dismissal_commit_id?: string | null; - } & { readonly [key: string]: any }; + }; /** Issue Event Milestone */ readonly "issue-event-milestone": { readonly title: string; - } & { readonly [key: string]: any }; + }; /** Issue Event Project Card */ readonly "issue-event-project-card": { readonly url: string; @@ -8606,28 +8552,28 @@ export interface components { readonly project_id: number; readonly column_name: string; readonly previous_column_name?: string; - } & { readonly [key: string]: any }; + }; /** Issue Event Rename */ readonly "issue-event-rename": { readonly from: string; readonly to: string; - } & { readonly [key: string]: any }; + }; /** Issue Event */ readonly "issue-event": { readonly id: number; readonly node_id: string; readonly url: string; - readonly actor: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly actor: components["schemas"]["simple-user"] | null; readonly event: string; readonly commit_id: string | null; readonly commit_url: string | null; readonly created_at: string; readonly issue?: components["schemas"]["issue-simple"]; readonly label?: components["schemas"]["issue-event-label"]; - readonly assignee?: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; - readonly assigner?: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; - readonly review_requester?: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; - readonly requested_reviewer?: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly assignee?: components["schemas"]["simple-user"] | null; + readonly assigner?: components["schemas"]["simple-user"] | null; + readonly review_requester?: components["schemas"]["simple-user"] | null; + readonly requested_reviewer?: components["schemas"]["simple-user"] | null; readonly requested_team?: components["schemas"]["team"]; readonly dismissed_review?: components["schemas"]["issue-event-dismissed-review"]; readonly milestone?: components["schemas"]["issue-event-milestone"]; @@ -8635,7 +8581,7 @@ export interface components { readonly rename?: components["schemas"]["issue-event-rename"]; readonly author_association?: components["schemas"]["author_association"]; readonly lock_reason?: string | null; - } & { readonly [key: string]: any }; + }; /** Issue Event for Issue */ readonly "issue-event-for-issue": { readonly id?: number; @@ -8659,7 +8605,7 @@ export interface components { readonly pull_request_url?: string; readonly body_html?: string; readonly body_text?: string; - } & { readonly [key: string]: any }; + }; /** An SSH key granting access to a single repository. */ readonly "deploy-key": { readonly id: number; @@ -8669,7 +8615,7 @@ export interface components { readonly verified: boolean; readonly created_at: string; readonly read_only: boolean; - } & { readonly [key: string]: any }; + }; /** Language */ readonly language: { readonly [key: string]: number }; /** License Content */ @@ -8689,13 +8635,13 @@ export interface components { readonly git: string | null; readonly html: string | null; readonly self: string; - } & { readonly [key: string]: any }; - readonly license: (components["schemas"]["license-simple"] & { readonly [key: string]: any }) | null; - } & { readonly [key: string]: any }; + }; + readonly license: components["schemas"]["license-simple"] | null; + }; readonly "pages-source-hash": { readonly branch: string; readonly path: string; - } & { readonly [key: string]: any }; + }; /** The configuration for GitHub Pages for a repository. */ readonly page: { /** The API address for accessing this Page resource. */ @@ -8711,25 +8657,25 @@ export interface components { readonly source?: components["schemas"]["pages-source-hash"]; /** 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. */ readonly public: boolean; - } & { readonly [key: string]: any }; + }; /** Page Build */ readonly "page-build": { readonly url: string; readonly status: string; readonly error: { readonly message: string | null; - } & { readonly [key: string]: any }; - readonly pusher: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + }; + readonly pusher: components["schemas"]["simple-user"] | null; readonly commit: string; readonly duration: number; readonly created_at: string; readonly updated_at: string; - } & { readonly [key: string]: any }; + }; /** Page Build Status */ readonly "page-build-status": { readonly url: string; readonly status: string; - } & { readonly [key: string]: any }; + }; /** 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. */ readonly "pull-request": { readonly url: string; @@ -8751,9 +8697,9 @@ export interface components { readonly locked: boolean; /** The title of the pull request. */ readonly title: string; - readonly user: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly user: components["schemas"]["simple-user"] | null; readonly body: string | null; - readonly labels: readonly ({ + readonly labels: readonly { readonly id?: number; readonly node_id?: string; readonly url?: string; @@ -8761,15 +8707,15 @@ export interface components { readonly description?: string | null; readonly color?: string; readonly default?: boolean; - } & { readonly [key: string]: any })[]; - readonly milestone: (components["schemas"]["milestone"] & { readonly [key: string]: any }) | null; + }[]; + readonly milestone: components["schemas"]["milestone"] | null; readonly active_lock_reason?: string | null; readonly created_at: string; readonly updated_at: string; readonly closed_at: string | null; readonly merged_at: string | null; readonly merge_commit_sha: string | null; - readonly assignee: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly assignee: components["schemas"]["simple-user"] | null; readonly assignees?: readonly components["schemas"]["simple-user"][] | null; readonly requested_reviewers?: readonly components["schemas"]["simple-user"][] | null; readonly requested_teams?: readonly components["schemas"]["team-simple"][] | null; @@ -8830,7 +8776,7 @@ export interface components { readonly subscriptions_url: string; readonly type: string; readonly url: string; - } & { readonly [key: string]: any }; + }; readonly private: boolean; readonly pulls_url: string; readonly releases_url: string; @@ -8864,20 +8810,18 @@ export interface components { readonly admin: boolean; readonly pull: boolean; readonly push: boolean; - } & { readonly [key: string]: any }; + }; readonly temp_clone_token?: string; readonly allow_merge_commit?: boolean; readonly allow_squash_merge?: boolean; readonly allow_rebase_merge?: boolean; - readonly license: - | ({ - readonly key: string; - readonly name: string; - readonly url: string | null; - readonly spdx_id: string | null; - readonly node_id: string; - } & { readonly [key: string]: any }) - | null; + readonly license: { + readonly key: string; + readonly name: string; + readonly url: string | null; + readonly spdx_id: string | null; + readonly node_id: string; + } | null; readonly pushed_at: string; readonly size: number; readonly ssh_url: string; @@ -8888,7 +8832,7 @@ export interface components { readonly watchers_count: number; readonly created_at: string; readonly updated_at: string; - } & { readonly [key: string]: any }; + }; readonly sha: string; readonly user: { readonly avatar_url: string; @@ -8909,8 +8853,8 @@ export interface components { readonly subscriptions_url: string; readonly type: string; readonly url: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; readonly base: { readonly label: string; readonly ref: string; @@ -8968,7 +8912,7 @@ export interface components { readonly subscriptions_url: string; readonly type: string; readonly url: string; - } & { readonly [key: string]: any }; + }; readonly private: boolean; readonly pulls_url: string; readonly releases_url: string; @@ -9002,12 +8946,12 @@ export interface components { readonly admin: boolean; readonly pull: boolean; readonly push: boolean; - } & { readonly [key: string]: any }; + }; readonly temp_clone_token?: string; readonly allow_merge_commit?: boolean; readonly allow_squash_merge?: boolean; readonly allow_rebase_merge?: boolean; - readonly license: (components["schemas"]["license-simple"] & { readonly [key: string]: any }) | null; + readonly license: components["schemas"]["license-simple"] | null; readonly pushed_at: string; readonly size: number; readonly ssh_url: string; @@ -9018,7 +8962,7 @@ export interface components { readonly watchers_count: number; readonly created_at: string; readonly updated_at: string; - } & { readonly [key: string]: any }; + }; readonly sha: string; readonly user: { readonly avatar_url: string; @@ -9039,8 +8983,8 @@ export interface components { readonly subscriptions_url: string; readonly type: string; readonly url: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; readonly _links: { readonly comments: components["schemas"]["link"]; readonly commits: components["schemas"]["link"]; @@ -9050,7 +8994,7 @@ export interface components { readonly review_comments: components["schemas"]["link"]; readonly review_comment: components["schemas"]["link"]; readonly self: components["schemas"]["link"]; - } & { readonly [key: string]: any }; + }; readonly author_association: components["schemas"]["author_association"]; readonly auto_merge: components["schemas"]["auto_merge"]; /** Indicates whether or not the pull request is a draft. */ @@ -9059,7 +9003,7 @@ export interface components { readonly mergeable: boolean | null; readonly rebaseable?: boolean | null; readonly mergeable_state: string; - readonly merged_by: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly merged_by: components["schemas"]["simple-user"] | null; readonly comments: number; readonly review_comments: number; /** Indicates whether maintainers can modify the pull request. */ @@ -9068,7 +9012,7 @@ export interface components { readonly additions: number; readonly deletions: number; readonly changed_files: number; - } & { readonly [key: string]: any }; + }; /** Pull Request Review Comments are comments on a portion of the Pull Request's diff. */ readonly "pull-request-review-comment": { /** URL for the pull request review comment */ @@ -9106,14 +9050,14 @@ export interface components { readonly _links: { readonly self: { readonly href: string; - } & { readonly [key: string]: any }; + }; readonly html: { readonly href: string; - } & { readonly [key: string]: any }; + }; readonly pull_request: { readonly href: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** The first line of the range for a multi-line comment. */ readonly start_line?: number | null; /** The first line of the range for a multi-line comment. */ @@ -9129,24 +9073,24 @@ export interface components { readonly reactions?: components["schemas"]["reaction-rollup"]; readonly body_html?: string; readonly body_text?: string; - } & { readonly [key: string]: any }; + }; /** Pull Request Merge Result */ readonly "pull-request-merge-result": { readonly sha: string; readonly merged: boolean; readonly message: string; - } & { readonly [key: string]: any }; + }; /** Pull Request Review Request */ readonly "pull-request-review-request": { readonly users: readonly components["schemas"]["simple-user"][]; readonly teams: readonly components["schemas"]["team-simple"][]; - } & { readonly [key: string]: any }; + }; /** Pull Request Reviews are reviews on pull requests. */ readonly "pull-request-review": { /** Unique identifier of the review */ readonly id: number; readonly node_id: string; - readonly user: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly user: components["schemas"]["simple-user"] | null; /** The text of the review. */ readonly body: string; readonly state: string; @@ -9155,18 +9099,18 @@ export interface components { readonly _links: { readonly html: { readonly href: string; - } & { readonly [key: string]: any }; + }; readonly pull_request: { readonly href: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; readonly submitted_at?: string; /** A commit SHA for the review. */ readonly commit_id: string; readonly body_html?: string; readonly body_text?: string; readonly author_association: components["schemas"]["author_association"]; - } & { readonly [key: string]: any }; + }; /** Legacy Review Comment */ readonly "review-comment": { readonly url: string; @@ -9180,7 +9124,7 @@ export interface components { readonly commit_id: string; readonly original_commit_id: string; readonly in_reply_to_id?: number; - readonly user: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly user: components["schemas"]["simple-user"] | null; readonly body: string; readonly created_at: string; readonly updated_at: string; @@ -9191,7 +9135,7 @@ export interface components { readonly self: components["schemas"]["link"]; readonly html: components["schemas"]["link"]; readonly pull_request: components["schemas"]["link"]; - } & { readonly [key: string]: any }; + }; readonly body_text?: string; readonly body_html?: string; /** The side of the first line of the range for a multi-line comment. */ @@ -9206,7 +9150,7 @@ export interface components { readonly start_line?: number | null; /** The original first line of the range for a multi-line comment. */ readonly original_start_line?: number | null; - } & { readonly [key: string]: any }; + }; /** Data related to a release. */ readonly "release-asset": { readonly url: string; @@ -9223,8 +9167,8 @@ export interface components { readonly download_count: number; readonly created_at: string; readonly updated_at: string; - readonly uploader: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; - } & { readonly [key: string]: any }; + readonly uploader: components["schemas"]["simple-user"] | null; + }; /** A release. */ readonly release: { readonly url: string; @@ -9251,7 +9195,7 @@ export interface components { readonly assets: readonly components["schemas"]["release-asset"][]; readonly body_html?: string; readonly body_text?: string; - } & { readonly [key: string]: any }; + }; /** 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`. */ readonly "secret-scanning-alert-state": "open" | "resolved"; /** **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`. */ @@ -9270,12 +9214,12 @@ export interface components { readonly secret_type?: string; /** The secret that was detected. */ readonly secret?: string; - } & { readonly [key: string]: any }; + }; /** Stargazer */ readonly stargazer: { readonly starred_at: string; - readonly user: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; - } & { readonly [key: string]: any }; + readonly user: components["schemas"]["simple-user"] | null; + }; /** Code Frequency Stat */ readonly "code-frequency-stat": readonly number[]; /** Commit Activity */ @@ -9283,22 +9227,22 @@ export interface components { readonly days: readonly number[]; readonly total: number; readonly week: number; - } & { readonly [key: string]: any }; + }; /** Contributor Activity */ readonly "contributor-activity": { - readonly author: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly author: components["schemas"]["simple-user"] | null; readonly total: number; - readonly weeks: readonly ({ + readonly weeks: readonly { readonly w?: string; readonly a?: number; readonly d?: number; readonly c?: number; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; readonly "participation-stats": { readonly all: readonly number[]; readonly owner: readonly number[]; - } & { readonly [key: string]: any }; + }; /** Repository invitations let you manage who you collaborate with. */ readonly "repository-subscription": { /** Determines if notifications should be received from this repository. */ @@ -9309,98 +9253,98 @@ export interface components { readonly created_at: string; readonly url: string; readonly repository_url: string; - } & { readonly [key: string]: any }; + }; /** Tag */ readonly tag: { readonly name: string; readonly commit: { readonly sha: string; readonly url: string; - } & { readonly [key: string]: any }; + }; readonly zipball_url: string; readonly tarball_url: string; readonly node_id: string; - } & { readonly [key: string]: any }; + }; /** A topic aggregates entities that are related to a subject. */ readonly topic: { readonly names: readonly string[]; - } & { readonly [key: string]: any }; + }; readonly traffic: { readonly timestamp: string; readonly uniques: number; readonly count: number; - } & { readonly [key: string]: any }; + }; /** Clone Traffic */ readonly "clone-traffic": { readonly count: number; readonly uniques: number; readonly clones: readonly components["schemas"]["traffic"][]; - } & { readonly [key: string]: any }; + }; /** Content Traffic */ readonly "content-traffic": { readonly path: string; readonly title: string; readonly count: number; readonly uniques: number; - } & { readonly [key: string]: any }; + }; /** Referrer Traffic */ readonly "referrer-traffic": { readonly referrer: string; readonly count: number; readonly uniques: number; - } & { readonly [key: string]: any }; + }; /** View Traffic */ readonly "view-traffic": { readonly count: number; readonly uniques: number; readonly views: readonly components["schemas"]["traffic"][]; - } & { readonly [key: string]: any }; + }; readonly "scim-group-list-enterprise": { readonly schemas: readonly string[]; readonly totalResults: number; readonly itemsPerPage: number; readonly startIndex: number; - readonly Resources: readonly ({ + readonly Resources: readonly { readonly schemas: readonly string[]; readonly id: string; readonly externalId?: string | null; readonly displayName?: string; - readonly members?: readonly ({ + readonly members?: readonly { readonly value?: string; readonly $ref?: string; readonly display?: string; - } & { readonly [key: string]: any })[]; + }[]; readonly meta?: { readonly resourceType?: string; readonly created?: string; readonly lastModified?: string; readonly location?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }; + }[]; + }; readonly "scim-enterprise-group": { readonly schemas: readonly string[]; readonly id: string; readonly externalId?: string | null; readonly displayName?: string; - readonly members?: readonly ({ + readonly members?: readonly { readonly value?: string; readonly $ref?: string; readonly display?: string; - } & { readonly [key: string]: any })[]; + }[]; readonly meta?: { readonly resourceType?: string; readonly created?: string; readonly lastModified?: string; readonly location?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; readonly "scim-user-list-enterprise": { readonly schemas: readonly string[]; readonly totalResults: number; readonly itemsPerPage: number; readonly startIndex: number; - readonly Resources: readonly ({ + readonly Resources: readonly { readonly schemas: readonly string[]; readonly id: string; readonly externalId?: string; @@ -9408,24 +9352,24 @@ export interface components { readonly name?: { readonly givenName?: string; readonly familyName?: string; - } & { readonly [key: string]: any }; - readonly emails?: readonly ({ + }; + readonly emails?: readonly { readonly value?: string; readonly primary?: boolean; readonly type?: string; - } & { readonly [key: string]: any })[]; - readonly groups?: readonly ({ + }[]; + readonly groups?: readonly { readonly value?: string; - } & { readonly [key: string]: any })[]; + }[]; readonly active?: boolean; readonly meta?: { readonly resourceType?: string; readonly created?: string; readonly lastModified?: string; readonly location?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }; + }[]; + }; readonly "scim-enterprise-user": { readonly schemas: readonly string[]; readonly id: string; @@ -9434,23 +9378,23 @@ export interface components { readonly name?: { readonly givenName?: string; readonly familyName?: string; - } & { readonly [key: string]: any }; - readonly emails?: readonly ({ + }; + readonly emails?: readonly { readonly value?: string; readonly type?: string; readonly primary?: boolean; - } & { readonly [key: string]: any })[]; - readonly groups?: readonly ({ + }[]; + readonly groups?: readonly { readonly value?: string; - } & { readonly [key: string]: any })[]; + }[]; readonly active?: boolean; readonly meta?: { readonly resourceType?: string; readonly created?: string; readonly lastModified?: string; readonly location?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** SCIM /Users provisioning endpoints */ readonly "scim-user": { /** SCIM schema used. */ @@ -9467,12 +9411,12 @@ export interface components { readonly givenName: string | null; readonly familyName: string | null; readonly formatted?: string | null; - } & { readonly [key: string]: any }; + }; /** user emails */ - readonly emails: readonly ({ + readonly emails: readonly { readonly value: string; readonly primary?: boolean; - } & { readonly [key: string]: any })[]; + }[]; /** The active status of the User. */ readonly active: boolean; readonly meta: { @@ -9480,23 +9424,21 @@ export interface components { readonly created?: string; readonly lastModified?: string; readonly location?: string; - } & { readonly [key: string]: any }; + }; /** The ID of the organization. */ readonly organization_id?: number; /** Set of operations to be performed */ - readonly operations?: readonly ({ + readonly operations?: readonly { readonly op: "add" | "remove" | "replace"; readonly path?: string; - readonly value?: (string | { readonly [key: string]: any } | readonly { readonly [key: string]: any }[]) & { - readonly [key: string]: any; - }; - } & { readonly [key: string]: any })[]; + readonly value?: string | { readonly [key: string]: any } | readonly { readonly [key: string]: any }[]; + }[]; /** associated groups */ - readonly groups?: readonly ({ + readonly groups?: readonly { readonly value?: string; readonly display?: string; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; /** SCIM User List */ readonly "scim-user-list": { /** SCIM schema used. */ @@ -9505,17 +9447,17 @@ export interface components { readonly itemsPerPage: number; readonly startIndex: number; readonly Resources: readonly components["schemas"]["scim-user"][]; - } & { readonly [key: string]: any }; - readonly "search-result-text-matches": readonly ({ + }; + readonly "search-result-text-matches": readonly { readonly object_url?: string; readonly object_type?: string | null; readonly property?: string; readonly fragment?: string; - readonly matches?: readonly ({ + readonly matches?: readonly { readonly text?: string; readonly indices?: readonly number[]; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any })[]; + }[]; + }[]; /** Code Search Result Item */ readonly "code-search-result-item": { readonly name: string; @@ -9531,7 +9473,7 @@ export interface components { readonly last_modified_at?: string; readonly line_numbers?: readonly string[]; readonly text_matches?: components["schemas"]["search-result-text-matches"]; - } & { readonly [key: string]: any }; + }; /** Commit Search Result Item */ readonly "commit-search-result-item": { readonly url: string; @@ -9543,29 +9485,29 @@ export interface components { readonly name: string; readonly email: string; readonly date: string; - } & { readonly [key: string]: any }; - readonly committer: (components["schemas"]["git-user"] & { readonly [key: string]: any }) | null; + }; + readonly committer: components["schemas"]["git-user"] | null; readonly comment_count: number; readonly message: string; readonly tree: { readonly sha: string; readonly url: string; - } & { readonly [key: string]: any }; + }; readonly url: string; readonly verification?: components["schemas"]["verification"]; - } & { readonly [key: string]: any }; - readonly author: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; - readonly committer: (components["schemas"]["git-user"] & { readonly [key: string]: any }) | null; - readonly parents: readonly ({ + }; + readonly author: components["schemas"]["simple-user"] | null; + readonly committer: components["schemas"]["git-user"] | null; + readonly parents: readonly { readonly url?: string; readonly html_url?: string; readonly sha?: string; - } & { readonly [key: string]: any })[]; + }[]; readonly repository: components["schemas"]["minimal-repository"]; readonly score: number; readonly node_id: string; readonly text_matches?: components["schemas"]["search-result-text-matches"]; - } & { readonly [key: string]: any }; + }; /** Issue Search Result Item */ readonly "issue-search-result-item": { readonly url: string; @@ -9581,8 +9523,8 @@ export interface components { readonly locked: boolean; readonly active_lock_reason?: string | null; readonly assignees?: readonly components["schemas"]["simple-user"][] | null; - readonly user: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; - readonly labels: readonly ({ + readonly user: components["schemas"]["simple-user"] | null; + readonly labels: readonly { readonly id?: number; readonly node_id?: string; readonly url?: string; @@ -9590,10 +9532,10 @@ export interface components { readonly color?: string; readonly default?: boolean; readonly description?: string | null; - } & { readonly [key: string]: any })[]; + }[]; readonly state: string; - readonly assignee: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; - readonly milestone: (components["schemas"]["milestone"] & { readonly [key: string]: any }) | null; + readonly assignee: components["schemas"]["simple-user"] | null; + readonly milestone: components["schemas"]["milestone"] | null; readonly comments: number; readonly created_at: string; readonly updated_at: string; @@ -9605,7 +9547,7 @@ export interface components { readonly html_url: string | null; readonly patch_url: string | null; readonly url: string | null; - } & { readonly [key: string]: any }; + }; readonly body?: string; readonly score: number; readonly author_association: components["schemas"]["author_association"]; @@ -9614,10 +9556,8 @@ export interface components { readonly body_html?: string; readonly body_text?: string; readonly timeline_url?: string; - readonly performed_via_github_app?: - | (components["schemas"]["integration"] & { readonly [key: string]: any }) - | null; - } & { readonly [key: string]: any }; + readonly performed_via_github_app?: components["schemas"]["integration"] | null; + }; /** Label Search Result Item */ readonly "label-search-result-item": { readonly id: number; @@ -9629,14 +9569,14 @@ export interface components { readonly description: string | null; readonly score: number; readonly text_matches?: components["schemas"]["search-result-text-matches"]; - } & { readonly [key: string]: any }; + }; /** Repo Search Result Item */ readonly "repo-search-result-item": { readonly id: number; readonly node_id: string; readonly name: string; readonly full_name: string; - readonly owner: (components["schemas"]["simple-user"] & { readonly [key: string]: any }) | null; + readonly owner: components["schemas"]["simple-user"] | null; readonly private: boolean; readonly html_url: string; readonly description: string | null; @@ -9708,19 +9648,19 @@ export interface components { readonly archived: boolean; /** Returns whether or not this repository disabled. */ readonly disabled: boolean; - readonly license: (components["schemas"]["license-simple"] & { readonly [key: string]: any }) | null; + readonly license: components["schemas"]["license-simple"] | null; readonly permissions?: { readonly admin: boolean; readonly pull: boolean; readonly push: boolean; - } & { readonly [key: string]: any }; + }; readonly text_matches?: components["schemas"]["search-result-text-matches"]; readonly temp_clone_token?: string; readonly allow_merge_commit?: boolean; readonly allow_squash_merge?: boolean; readonly allow_rebase_merge?: boolean; readonly delete_branch_on_merge?: boolean; - } & { readonly [key: string]: any }; + }; /** Topic Search Result Item */ readonly "topic-search-result-item": { readonly name: string; @@ -9738,26 +9678,26 @@ export interface components { readonly logo_url?: string | null; readonly text_matches?: components["schemas"]["search-result-text-matches"]; readonly related?: - | readonly ({ + | readonly { readonly topic_relation?: { readonly id?: number; readonly name?: string; readonly topic_id?: number; readonly relation_type?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any })[] + }; + }[] | null; readonly aliases?: - | readonly ({ + | readonly { readonly topic_relation?: { readonly id?: number; readonly name?: string; readonly topic_id?: number; readonly relation_type?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any })[] + }; + }[] | null; - } & { readonly [key: string]: any }; + }; /** User Search Result Item */ readonly "user-search-result-item": { readonly login: string; @@ -9794,7 +9734,7 @@ export interface components { readonly blog?: string | null; readonly company?: string | null; readonly suspended_at?: string | null; - } & { readonly [key: string]: any }; + }; /** Private User */ readonly "private-user": { readonly login: string; @@ -9840,11 +9780,11 @@ export interface components { readonly name: string; readonly space: number; readonly private_repos: number; - } & { readonly [key: string]: any }; + }; readonly suspended_at?: string | null; readonly business_plus?: boolean; readonly ldap_dn?: string; - } & { readonly [key: string]: any }; + }; /** Public User */ readonly "public-user": { readonly login: string; @@ -9884,7 +9824,7 @@ export interface components { readonly name: string; readonly space: number; readonly private_repos: number; - } & { readonly [key: string]: any }; + }; readonly suspended_at?: string | null; readonly private_gists?: number; readonly total_private_repos?: number; @@ -9898,18 +9838,18 @@ export interface components { readonly primary: boolean; readonly verified: boolean; readonly visibility: string | null; - } & { readonly [key: string]: any }; + }; /** A unique encryption key */ readonly "gpg-key": { readonly id: number; readonly primary_key_id: number | null; readonly key_id: string; readonly public_key: string; - readonly emails: readonly ({ + readonly emails: readonly { readonly email?: string; readonly verified?: boolean; - } & { readonly [key: string]: any })[]; - readonly subkeys: readonly ({ + }[]; + readonly subkeys: readonly { readonly id?: number; readonly primary_key_id?: number; readonly key_id?: string; @@ -9923,7 +9863,7 @@ export interface components { readonly created_at?: string; readonly expires_at?: string | null; readonly raw_key?: string | null; - } & { readonly [key: string]: any })[]; + }[]; readonly can_sign: boolean; readonly can_encrypt_comms: boolean; readonly can_encrypt_storage: boolean; @@ -9931,7 +9871,7 @@ export interface components { readonly created_at: string; readonly expires_at: string | null; readonly raw_key: string | null; - } & { readonly [key: string]: any }; + }; /** Key */ readonly key: { readonly key_id: string; @@ -9942,7 +9882,7 @@ export interface components { readonly created_at: string; readonly verified: boolean; readonly read_only: boolean; - } & { readonly [key: string]: any }; + }; readonly "marketplace-account": { readonly url: string; readonly id: number; @@ -9951,7 +9891,7 @@ export interface components { readonly login: string; readonly email?: string | null; readonly organization_billing_email?: string | null; - } & { readonly [key: string]: any }; + }; /** User Marketplace Purchase */ readonly "user-marketplace-purchase": { readonly billing_cycle: string; @@ -9962,24 +9902,24 @@ export interface components { readonly updated_at: string | null; readonly account: components["schemas"]["marketplace-account"]; readonly plan: components["schemas"]["marketplace-listing-plan"]; - } & { readonly [key: string]: any }; + }; /** Starred Repository */ readonly "starred-repository": { readonly starred_at: string; readonly repo: components["schemas"]["repository"]; - } & { readonly [key: string]: any }; + }; /** Hovercard */ readonly hovercard: { - readonly contexts: readonly ({ + readonly contexts: readonly { readonly message: string; readonly octicon: string; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; /** Key Simple */ readonly "key-simple": { readonly id: number; readonly key: string; - } & { readonly [key: string]: any }; + }; }; readonly responses: { /** Resource Not Found */ @@ -10000,7 +9940,7 @@ export interface components { readonly "application/json": { readonly message: string; readonly documentation_url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Forbidden */ @@ -10036,7 +9976,7 @@ export interface components { readonly code?: string; readonly message?: string; readonly documentation_url?: string; - } & { readonly [key: string]: any }; + }; }; }; /** Forbidden Gist */ @@ -10047,10 +9987,10 @@ export interface components { readonly reason?: string; readonly created_at?: string; readonly html_url?: string | null; - } & { readonly [key: string]: any }; + }; readonly message?: string; readonly documentation_url?: string; - } & { readonly [key: string]: any }; + }; }; }; /** Moved Permanently */ @@ -10253,7 +10193,7 @@ export interface components { /** The id of the workflow run */ readonly "run-id": number; /** The ID of the workflow. You can also pass the workflow file name as a string. */ - readonly "workflow-id": (number | string) & { readonly [key: string]: any }; + readonly "workflow-id": number | string; /** The name of the branch. */ readonly branch: string; /** check_run_id parameter */ @@ -10363,7 +10303,7 @@ export interface operations { readonly user_organizations_url: string; readonly user_repositories_url: string; readonly user_search_url: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -10401,7 +10341,7 @@ export interface operations { readonly client_secret: string; readonly webhook_secret: string; readonly pem: string; - } & { readonly [key: string]: any }) & { readonly [key: string]: any }; + } & { readonly [key: string]: any }); }; }; readonly 404: components["responses"]["not_found"]; @@ -10444,7 +10384,7 @@ export interface operations { readonly content_type?: components["schemas"]["webhook-config-content-type"]; readonly secret?: components["schemas"]["webhook-config-secret"]; readonly insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -10549,7 +10489,7 @@ export interface operations { /** List of repository IDs that the token should have access to */ readonly repository_ids?: readonly number[]; readonly permissions?: components["schemas"]["app-permissions"]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -10678,7 +10618,7 @@ export interface operations { readonly "application/json": { /** The OAuth access token used to authenticate to the GitHub API. */ readonly access_token?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -10725,7 +10665,7 @@ export interface operations { readonly "application/json": { /** The access_token of the OAuth application. */ readonly access_token: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -10747,7 +10687,7 @@ export interface operations { readonly "application/json": { /** The OAuth access token used to authenticate to the GitHub API. */ readonly access_token?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -10773,7 +10713,7 @@ export interface operations { readonly "application/json": { /** The access_token of the OAuth application. */ readonly access_token: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -10811,7 +10751,7 @@ export interface operations { /** The list of repository names to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. */ readonly repository_ids?: readonly number[]; readonly permissions?: components["schemas"]["app-permissions"]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -10832,9 +10772,7 @@ export interface operations { /** response */ readonly 200: { readonly content: { - readonly "application/json": - | (components["schemas"]["authorization"] & { readonly [key: string]: any }) - | null; + readonly "application/json": components["schemas"]["authorization"] | null; }; }; readonly 404: components["responses"]["not_found"]; @@ -10973,7 +10911,7 @@ export interface operations { readonly client_secret?: string; /** A unique string to distinguish an authorization from others created for the same client ID and user. */ readonly fingerprint?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -11032,7 +10970,7 @@ export interface operations { readonly note_url?: string; /** A unique string to distinguish an authorization from others created for the same client ID and user. */ readonly fingerprint?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -11085,7 +11023,7 @@ export interface operations { readonly note?: string; /** A URL to remind you what app the OAuth token is for. */ readonly note_url?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -11163,7 +11101,7 @@ export interface operations { readonly note_url?: string; /** A unique string to distinguish an authorization from others created for the same client ID and user. */ readonly fingerprint?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -11232,7 +11170,7 @@ export interface operations { readonly title: string; /** The body of the attachment */ readonly body: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -11291,7 +11229,7 @@ export interface operations { readonly "application/json": { readonly enabled_organizations: components["schemas"]["enabled-organizations"]; readonly allowed_actions?: components["schemas"]["allowed-actions"]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -11320,7 +11258,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly organizations: readonly components["schemas"]["organization-simple"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -11346,7 +11284,7 @@ export interface operations { readonly "application/json": { /** List of organization IDs to enable for GitHub Actions. */ readonly selected_organization_ids: readonly number[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -11456,7 +11394,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly runner_groups: readonly components["schemas"]["runner-groups-enterprise"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -11492,7 +11430,7 @@ export interface operations { readonly selected_organization_ids?: readonly number[]; /** List of runner IDs to add to the runner group. */ readonly runners?: readonly number[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -11567,7 +11505,7 @@ export interface operations { readonly name?: string; /** Visibility of a runner group. You can select all organizations or select individual organizations. Can be one of: `all` or `selected` */ readonly visibility?: "selected" | "all"; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -11598,7 +11536,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly organizations: readonly components["schemas"]["organization-simple"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -11626,7 +11564,7 @@ export interface operations { readonly "application/json": { /** List of organization IDs that can access the runner group. */ readonly selected_organization_ids: readonly number[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -11700,7 +11638,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly runners: readonly components["schemas"]["runner"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -11728,7 +11666,7 @@ export interface operations { readonly "application/json": { /** List of runner IDs to add to the runner group. */ readonly runners: readonly number[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -11801,7 +11739,7 @@ export interface operations { readonly "application/json": { readonly total_count?: number; readonly runners?: readonly components["schemas"]["runner"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -12146,10 +12084,10 @@ export interface operations { readonly [key: string]: { /** Content of the file */ readonly content: string; - } & { readonly [key: string]: any }; + }; }; - readonly public?: (boolean | ("true" | "false")) & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + readonly public?: boolean | ("true" | "false"); + }; }; }; }; @@ -12271,7 +12209,7 @@ export interface operations { Partial<{ readonly [key: string]: any }> & Partial<{ readonly [key: string]: any }>; }; - } & { readonly [key: string]: any }) + }) | null; }; }; @@ -12328,7 +12266,7 @@ export interface operations { readonly "application/json": { /** The comment text. */ readonly body: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -12393,7 +12331,7 @@ export interface operations { readonly "application/json": { /** The comment text. */ readonly body: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -12602,7 +12540,7 @@ export interface operations { readonly total_count: number; readonly repositories: readonly components["schemas"]["repository"][]; readonly repository_selection?: string; - } & { readonly [key: string]: any }; + }; }; }; readonly 304: components["responses"]["not_modified"]; @@ -12739,7 +12677,7 @@ export interface operations { readonly mode?: "markdown" | "gfm"; /** The repository context to use when creating references in `gfm` mode. */ readonly context?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -13018,7 +12956,7 @@ export interface operations { readonly content: { readonly "application/json": { readonly message?: string; - } & { readonly [key: string]: any }; + }; }; }; /** response */ @@ -13034,7 +12972,7 @@ export interface operations { readonly last_read_at?: string; /** Whether the notification has been read. */ readonly read?: boolean; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -13125,7 +13063,7 @@ export interface operations { readonly "application/json": { /** Whether to block all notifications from a thread. */ readonly ignored?: boolean; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -13233,10 +13171,9 @@ export interface operations { /** Validation Failed */ readonly 422: { readonly content: { - readonly "application/json": ( + readonly "application/json": | components["schemas"]["validation-error"] - | components["schemas"]["validation-error-simple"] - ) & { readonly [key: string]: any }; + | components["schemas"]["validation-error-simple"]; }; }; }; @@ -13325,7 +13262,7 @@ export interface operations { */ readonly members_can_create_private_pages?: boolean; readonly blog?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -13371,7 +13308,7 @@ export interface operations { readonly "application/json": { readonly enabled_repositories: components["schemas"]["enabled-repositories"]; readonly allowed_actions?: components["schemas"]["allowed-actions"]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -13399,7 +13336,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly repositories: readonly components["schemas"]["repository"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -13424,7 +13361,7 @@ export interface operations { readonly "application/json": { /** List of repository IDs to enable for GitHub Actions. */ readonly selected_repository_ids: readonly number[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -13533,7 +13470,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly runner_groups: readonly components["schemas"]["runner-groups-org"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -13570,7 +13507,7 @@ export interface operations { readonly selected_repository_ids?: readonly number[]; /** List of runner IDs to add to the runner group. */ readonly runners?: readonly number[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -13648,7 +13585,7 @@ export interface operations { readonly name?: string; /** 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`. */ readonly visibility?: "selected" | "all" | "private"; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -13674,7 +13611,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly repositories: readonly components["schemas"]["repository"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -13703,7 +13640,7 @@ export interface operations { readonly "application/json": { /** List of repository IDs that can access the runner group. */ readonly selected_repository_ids: readonly number[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -13781,7 +13718,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly runners: readonly components["schemas"]["runner"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -13810,7 +13747,7 @@ export interface operations { readonly "application/json": { /** List of runner IDs to add to the runner group. */ readonly runners: readonly number[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -13886,7 +13823,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly runners: readonly components["schemas"]["runner"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -14029,7 +13966,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly secrets: readonly components["schemas"]["organization-actions-secret"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -14175,7 +14112,7 @@ export interface operations { readonly visibility?: "all" | "private" | "selected"; /** 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. */ readonly selected_repository_ids?: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -14209,7 +14146,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly repositories: readonly components["schemas"]["minimal-repository"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -14232,7 +14169,7 @@ export interface operations { readonly "application/json": { /** 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. */ readonly selected_repository_ids?: readonly number[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -14517,12 +14454,12 @@ export interface operations { readonly insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; readonly username?: string; readonly password?: string; - } & { readonly [key: string]: any }; + }; /** Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. */ readonly events?: readonly string[]; /** Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. */ readonly active?: boolean; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -14584,13 +14521,13 @@ export interface operations { readonly content_type?: components["schemas"]["webhook-config-content-type"]; readonly secret?: components["schemas"]["webhook-config-secret"]; readonly insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; - } & { readonly [key: string]: any }; + }; /** Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. */ readonly events?: readonly string[]; /** Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. */ readonly active?: boolean; readonly name?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -14642,7 +14579,7 @@ export interface operations { readonly content_type?: components["schemas"]["webhook-config-content-type"]; readonly secret?: components["schemas"]["webhook-config-secret"]; readonly insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -14701,7 +14638,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly installations: readonly components["schemas"]["installation"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -14817,7 +14754,7 @@ export interface operations { readonly role?: "admin" | "direct_member" | "billing_manager"; /** Specify IDs for the teams you want to invite new members to. */ readonly team_ids?: readonly number[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -15043,7 +14980,7 @@ export interface operations { * \* `member` - The user will become a non-owner member of the organization. */ readonly role?: "admin" | "member"; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -15116,7 +15053,7 @@ export interface operations { /** Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). */ readonly exclude_attachments?: boolean; readonly exclude?: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -15274,7 +15211,7 @@ export interface operations { readonly "application/json": { readonly message?: string; readonly documentation_url?: string; - } & { readonly [key: string]: any }; + }; }; }; readonly 404: components["responses"]["not_found"]; @@ -15297,7 +15234,7 @@ export interface operations { readonly "application/json": { readonly message?: string; readonly documentation_url?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -15547,7 +15484,7 @@ export interface operations { readonly name: string; /** The description of the project. */ readonly body?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -15716,7 +15653,7 @@ export interface operations { readonly allow_rebase_merge?: boolean; /** Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. */ readonly delete_branch_on_merge?: boolean; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -15893,7 +15830,7 @@ export interface operations { readonly permission?: "pull" | "push" | "admin"; /** The ID of a team to set as the parent team. */ readonly parent_team_id?: number; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -15986,7 +15923,7 @@ export interface operations { readonly permission?: "pull" | "push" | "admin"; /** The ID of a team to set as the parent team. */ readonly parent_team_id?: number | null; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -16053,7 +15990,7 @@ export interface operations { readonly body: string; /** 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. */ readonly private?: boolean; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -16128,7 +16065,7 @@ export interface operations { readonly title?: string; /** The discussion post's body text. */ readonly body?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -16193,7 +16130,7 @@ export interface operations { readonly "application/json": { /** The discussion comment's body text. */ readonly body: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -16269,7 +16206,7 @@ export interface operations { readonly "application/json": { /** The discussion comment's body text. */ readonly body: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -16334,7 +16271,7 @@ export interface operations { readonly "application/json": { /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. */ readonly content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -16418,7 +16355,7 @@ export interface operations { readonly "application/json": { /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. */ readonly content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -16572,12 +16509,12 @@ export interface operations { readonly content: { readonly "application/json": { readonly message?: string; - readonly errors?: readonly ({ + readonly errors?: readonly { readonly code?: string; readonly field?: string; readonly resource?: string; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; }; }; }; @@ -16590,7 +16527,7 @@ export interface operations { * \* `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. */ readonly role?: "member" | "maintainer"; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -16696,24 +16633,22 @@ export interface operations { readonly "application/json": { readonly message?: string; readonly documentation_url?: string; - } & { readonly [key: string]: any }; + }; }; }; }; readonly requestBody: { readonly content: { - readonly "application/json": - | ({ - /** - * 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)." - */ - readonly permission?: "read" | "write" | "admin"; - } & { readonly [key: string]: any }) - | null; + readonly "application/json": { + /** + * 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)." + */ + readonly permission?: "read" | "write" | "admin"; + } | null; }; }; }; @@ -16832,7 +16767,7 @@ export interface operations { * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. */ readonly permission?: "pull" | "push" | "admin" | "maintain" | "triage"; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -16907,15 +16842,15 @@ export interface operations { readonly content: { readonly "application/json": { /** 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. */ - readonly groups: readonly ({ + readonly groups: readonly { /** ID of the IdP group. */ readonly group_id: string; /** Name of the IdP group. */ readonly group_name: string; /** Description of the IdP group. */ readonly group_description: string; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; }; }; }; @@ -16987,7 +16922,7 @@ export interface operations { readonly message?: string; readonly documentation_url?: string; readonly errors?: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; readonly 404: components["responses"]["not_found"]; @@ -17020,7 +16955,7 @@ export interface operations { readonly note?: string | null; /** Whether or not the card is archived */ readonly archived?: boolean; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -17046,13 +16981,13 @@ export interface operations { readonly "application/json": { readonly message?: string; readonly documentation_url?: string; - readonly errors?: readonly ({ + readonly errors?: readonly { readonly code?: string; readonly message?: string; readonly resource?: string; readonly field?: string; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; }; }; readonly 422: components["responses"]["validation_failed"]; @@ -17063,11 +16998,11 @@ export interface operations { readonly code?: string; readonly message?: string; readonly documentation_url?: string; - readonly errors?: readonly ({ + readonly errors?: readonly { readonly code?: string; readonly message?: string; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; }; }; }; @@ -17078,7 +17013,7 @@ export interface operations { readonly position: string; /** The unique identifier of the column the card should be moved to */ readonly column_id?: number; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -17140,7 +17075,7 @@ export interface operations { readonly "application/json": { /** Name of the project column */ readonly name: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -17197,10 +17132,9 @@ export interface operations { /** Validation Failed */ readonly 422: { readonly content: { - readonly "application/json": ( + readonly "application/json": | components["schemas"]["validation-error"] - | components["schemas"]["validation-error-simple"] - ) & { readonly [key: string]: any }; + | components["schemas"]["validation-error-simple"]; }; }; /** Service Unavailable */ @@ -17210,28 +17144,27 @@ export interface operations { readonly code?: string; readonly message?: string; readonly documentation_url?: string; - readonly errors?: readonly ({ + readonly errors?: readonly { readonly code?: string; readonly message?: string; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; }; }; }; readonly requestBody: { readonly content: { - readonly "application/json": ( - | ({ + readonly "application/json": + | { /** The project card's note */ readonly note: string | null; - } & { readonly [key: string]: any }) - | ({ + } + | { /** The unique identifier of the content associated with the card */ readonly content_id: number; /** The piece of content associated with the card */ readonly content_type: string; - } & { readonly [key: string]: any }) - ) & { readonly [key: string]: any }; + }; }; }; }; @@ -17259,7 +17192,7 @@ export interface operations { readonly "application/json": { /** The position of the column in a project */ readonly position: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -17301,7 +17234,7 @@ export interface operations { readonly message?: string; readonly documentation_url?: string; readonly errors?: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; readonly 404: components["responses"]["not_found"]; @@ -17331,7 +17264,7 @@ export interface operations { readonly message?: string; readonly documentation_url?: string; readonly errors?: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; /** Response if the authenticated user does not have access to the project */ @@ -17352,7 +17285,7 @@ export interface operations { readonly organization_permission?: "read" | "write" | "admin" | "none"; /** Whether or not this project can be seen by everyone. */ readonly private?: boolean; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -17415,7 +17348,7 @@ export interface operations { readonly "application/json": { /** The permission to grant the collaborator. */ readonly permission?: "read" | "write" | "admin"; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -17509,7 +17442,7 @@ export interface operations { readonly "application/json": { /** Name of the project column */ readonly name: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -17599,7 +17532,7 @@ export interface operations { readonly "application/json": { readonly message?: string; readonly documentation_url?: string; - } & { readonly [key: string]: any }; + }; }; }; readonly 404: components["responses"]["not_found"]; @@ -17660,7 +17593,7 @@ export interface operations { readonly delete_branch_on_merge?: boolean; /** `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. */ readonly archived?: boolean; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -17686,7 +17619,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly artifacts: readonly components["schemas"]["artifact"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -17830,7 +17763,7 @@ export interface operations { readonly "application/json": { readonly enabled: components["schemas"]["actions-enabled"]; readonly allowed_actions?: components["schemas"]["allowed-actions"]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -17903,7 +17836,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly runners: readonly components["schemas"]["runner"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -18063,7 +17996,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly workflow_runs: readonly components["schemas"]["workflow-run"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -18149,7 +18082,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly artifacts: readonly components["schemas"]["artifact"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -18199,7 +18132,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly jobs: readonly components["schemas"]["job"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -18293,7 +18226,7 @@ export interface operations { readonly state: "approved" | "rejected"; /** A comment to accompany the deployment review */ readonly comment: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -18357,7 +18290,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly secrets: readonly components["schemas"]["actions-secret"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -18497,7 +18430,7 @@ export interface operations { readonly encrypted_value?: string; /** ID of the key you used to encrypt the secret. */ readonly key_id?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -18538,7 +18471,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly workflows: readonly components["schemas"]["workflow"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -18608,7 +18541,7 @@ export interface operations { readonly ref: string; /** 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. */ readonly inputs?: { readonly [key: string]: string }; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -18667,7 +18600,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly workflow_runs: readonly components["schemas"]["workflow-run"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -18872,52 +18805,46 @@ export interface operations { readonly content: { readonly "application/json": { /** Require status checks to pass before merging. Set to `null` to disable. */ - readonly required_status_checks: - | ({ - /** Require branches to be up to date before merging. */ - readonly strict: boolean; - /** The list of status checks to require in order to merge into this branch */ - readonly contexts: readonly string[]; - } & { readonly [key: string]: any }) - | null; + readonly required_status_checks: { + /** Require branches to be up to date before merging. */ + readonly strict: boolean; + /** The list of status checks to require in order to merge into this branch */ + readonly contexts: readonly string[]; + } | null; /** Enforce all configured restrictions for administrators. Set to `true` to enforce required status checks for repository administrators. Set to `null` to disable. */ readonly enforce_admins: boolean | null; /** Require at least one approving review on a pull request, before merging. Set to `null` to disable. */ - readonly required_pull_request_reviews: - | ({ - /** 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. */ - readonly dismissal_restrictions?: { - /** The list of user `login`s with dismissal access */ - readonly users?: readonly string[]; - /** The list of team `slug`s with dismissal access */ - readonly teams?: readonly string[]; - } & { readonly [key: string]: any }; - /** Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ - readonly dismiss_stale_reviews?: boolean; - /** Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) review them. */ - readonly require_code_owner_reviews?: boolean; - /** Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6. */ - readonly required_approving_review_count?: number; - } & { readonly [key: string]: any }) - | null; + readonly required_pull_request_reviews: { + /** 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. */ + readonly dismissal_restrictions?: { + /** The list of user `login`s with dismissal access */ + readonly users?: readonly string[]; + /** The list of team `slug`s with dismissal access */ + readonly teams?: readonly string[]; + }; + /** Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + readonly dismiss_stale_reviews?: boolean; + /** Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) review them. */ + readonly require_code_owner_reviews?: boolean; + /** Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6. */ + readonly required_approving_review_count?: number; + } | null; /** 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. */ - readonly restrictions: - | ({ - /** The list of user `login`s with push access */ - readonly users: readonly string[]; - /** The list of team `slug`s with push access */ - readonly teams: readonly string[]; - /** The list of app `slug`s with push access */ - readonly apps?: readonly string[]; - } & { readonly [key: string]: any }) - | null; + readonly restrictions: { + /** The list of user `login`s with push access */ + readonly users: readonly string[]; + /** The list of team `slug`s with push access */ + readonly teams: readonly string[]; + /** The list of app `slug`s with push access */ + readonly apps?: readonly string[]; + } | null; /** 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://help.github.com/github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. */ readonly required_linear_history?: boolean; /** 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://help.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." */ readonly allow_force_pushes?: boolean | null; /** 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://help.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. */ readonly allow_deletions?: boolean; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -19068,14 +18995,14 @@ export interface operations { readonly users?: readonly string[]; /** The list of team `slug`s with dismissal access */ readonly teams?: readonly string[]; - } & { readonly [key: string]: any }; + }; /** Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ readonly dismiss_stale_reviews?: boolean; /** Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) have reviewed. */ readonly require_code_owner_reviews?: boolean; /** Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6. */ readonly required_approving_review_count?: number; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -19215,7 +19142,7 @@ export interface operations { readonly strict?: boolean; /** The list of status checks to require in order to merge into this branch */ readonly contexts?: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -19264,7 +19191,7 @@ export interface operations { readonly "application/json": { /** contexts parameter */ readonly contexts: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -19294,7 +19221,7 @@ export interface operations { readonly "application/json": { /** contexts parameter */ readonly contexts: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -19323,7 +19250,7 @@ export interface operations { readonly "application/json": { /** contexts parameter */ readonly contexts: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -19428,7 +19355,7 @@ export interface operations { readonly "application/json": { /** apps parameter */ readonly apps: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -19464,7 +19391,7 @@ export interface operations { readonly "application/json": { /** apps parameter */ readonly apps: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -19500,7 +19427,7 @@ export interface operations { readonly "application/json": { /** apps parameter */ readonly apps: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -19560,7 +19487,7 @@ export interface operations { readonly "application/json": { /** teams parameter */ readonly teams: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -19596,7 +19523,7 @@ export interface operations { readonly "application/json": { /** teams parameter */ readonly teams: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -19632,7 +19559,7 @@ export interface operations { readonly "application/json": { /** teams parameter */ readonly teams: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -19692,7 +19619,7 @@ export interface operations { readonly "application/json": { /** users parameter */ readonly users: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -19728,7 +19655,7 @@ export interface operations { readonly "application/json": { /** users parameter */ readonly users: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -19764,7 +19691,7 @@ export interface operations { readonly "application/json": { /** users parameter */ readonly users: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -19810,7 +19737,7 @@ export interface operations { readonly "application/json": { /** The new name of the branch. */ readonly new_name: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -19884,7 +19811,7 @@ export interface operations { /** The details of the check run. This parameter supports Markdown. */ readonly text?: string; /** 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://help.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. */ - readonly annotations?: readonly ({ + readonly annotations?: readonly { /** The path of the file to add an annotation to. For example, `assets/css/main.css`. */ readonly path: string; /** The start line of the annotation. */ @@ -19903,27 +19830,27 @@ export interface operations { readonly title?: string; /** Details about this annotation. The maximum size is 64 KB. */ readonly raw_details?: string; - } & { readonly [key: string]: any })[]; + }[]; /** 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. */ - readonly images?: readonly ({ + readonly images?: readonly { /** The alternative text for the image. */ readonly alt: string; /** The full URL of the image. */ readonly image_url: string; /** A short image description. */ readonly caption?: string; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; /** 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)." 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)." */ - readonly actions?: readonly ({ + readonly actions?: readonly { /** The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ readonly label: string; /** A short explanation of what this action would do. The maximum size is 40 characters. */ readonly description: string; /** A reference for the action on the integrator's system. The maximum size is 20 characters. */ readonly identifier: string; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; }; }; }; @@ -20018,7 +19945,7 @@ export interface operations { /** Can contain Markdown. */ readonly text?: string; /** 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://help.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */ - readonly annotations?: readonly ({ + readonly annotations?: readonly { /** The path of the file to add an annotation to. For example, `assets/css/main.css`. */ readonly path: string; /** The start line of the annotation. */ @@ -20037,27 +19964,27 @@ export interface operations { readonly title?: string; /** Details about this annotation. The maximum size is 64 KB. */ readonly raw_details?: string; - } & { readonly [key: string]: any })[]; + }[]; /** 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. */ - readonly images?: readonly ({ + readonly images?: readonly { /** The alternative text for the image. */ readonly alt: string; /** The full URL of the image. */ readonly image_url: string; /** A short image description. */ readonly caption?: string; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; /** 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)." */ - readonly actions?: readonly ({ + readonly actions?: readonly { /** The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ readonly label: string; /** A short explanation of what this action would do. The maximum size is 40 characters. */ readonly description: string; /** A reference for the action on the integrator's system. The maximum size is 20 characters. */ readonly identifier: string; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; }; }; }; @@ -20112,7 +20039,7 @@ export interface operations { readonly "application/json": { /** The sha of the head commit. */ readonly head_sha: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -20136,13 +20063,13 @@ export interface operations { readonly content: { readonly "application/json": { /** 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. */ - readonly auto_trigger_checks?: readonly ({ + readonly auto_trigger_checks?: readonly { /** The `id` of the GitHub App. */ readonly app_id: number; /** Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. */ readonly setting: boolean; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; }; }; }; @@ -20203,7 +20130,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly check_runs: readonly components["schemas"]["check-run"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -20324,7 +20251,7 @@ export interface operations { readonly "application/json": { readonly state: components["schemas"]["code-scanning-alert-set-state"]; readonly dismissed_reason?: components["schemas"]["code-scanning-alert-dismissed-reason"]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -20598,7 +20525,7 @@ export interface operations { readonly started_at?: string; /** 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`. */ readonly tool_name?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -20727,7 +20654,7 @@ export interface operations { */ readonly permission?: "pull" | "push" | "admin" | "maintain" | "triage"; readonly permissions?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -20848,7 +20775,7 @@ export interface operations { readonly "application/json": { /** The contents of the comment */ readonly body: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -20913,7 +20840,7 @@ export interface operations { readonly "application/json": { /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment. */ readonly content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -21093,7 +21020,7 @@ export interface operations { readonly position?: number; /** **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ readonly line?: number; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -21217,7 +21144,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly check_runs: readonly components["schemas"]["check-run"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -21254,7 +21181,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly check_suites: readonly components["schemas"]["check-suite"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -21486,12 +21413,11 @@ export interface operations { readonly 200: { readonly content: { readonly "application/vnd.github.v3.object": components["schemas"]["content-tree"]; - readonly "application/json": ( + readonly "application/json": | components["schemas"]["content-directory"] | components["schemas"]["content-file"] | components["schemas"]["content-symlink"] - | components["schemas"]["content-submodule"] - ) & { readonly [key: string]: any }; + | components["schemas"]["content-submodule"]; }; }; readonly 302: components["responses"]["found"]; @@ -21544,7 +21470,7 @@ export interface operations { /** The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ readonly email: string; readonly date?: string; - } & { readonly [key: string]: any }; + }; /** The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ readonly author?: { /** The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ @@ -21552,8 +21478,8 @@ export interface operations { /** The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ readonly email: string; readonly date?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; }; }; }; @@ -21602,15 +21528,15 @@ export interface operations { readonly name?: string; /** The email of the author (or committer) of the commit */ readonly email?: string; - } & { readonly [key: string]: any }; + }; /** object containing information about the author. */ readonly author?: { /** The name of the author (or committer) of the commit */ readonly name?: string; /** The email of the author (or committer) of the commit */ readonly email?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; }; }; }; @@ -21746,7 +21672,7 @@ export interface operations { readonly content: { readonly "application/json": { readonly message?: string; - } & { readonly [key: string]: any }; + }; }; }; /** response */ @@ -21755,7 +21681,7 @@ export interface operations { readonly "application/json": { readonly message?: string; readonly documentation_url?: string; - } & { readonly [key: string]: any }; + }; }; }; readonly 422: components["responses"]["validation_failed"]; @@ -21771,7 +21697,7 @@ export interface operations { readonly auto_merge?: boolean; /** The [status](https://docs.github.com/rest/reference/repos#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. */ readonly required_contexts?: readonly string[]; - readonly payload?: ({ readonly [key: string]: any } | string) & { readonly [key: string]: any }; + readonly payload?: { readonly [key: string]: any } | string; /** Name for the target deployment environment (e.g., `production`, `staging`, `qa`). */ readonly environment?: string; /** Short description of the deployment. */ @@ -21787,7 +21713,7 @@ export interface operations { */ readonly production_environment?: boolean; readonly created_at?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -21916,7 +21842,7 @@ export interface operations { * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type. */ readonly auto_inactive?: boolean; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -21973,7 +21899,7 @@ export interface operations { readonly event_type: string; /** JSON payload with extra information about the webhook event that your action or worklow may use. */ readonly client_payload?: { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -21997,7 +21923,7 @@ export interface operations { /** The number of environments in this repository */ readonly total_count?: number; readonly environments?: readonly components["schemas"]["environment"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -22058,13 +21984,13 @@ export interface operations { readonly "application/json": { readonly wait_timer?: components["schemas"]["wait-timer"]; /** 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. */ - readonly reviewers?: readonly ({ + readonly reviewers?: readonly { readonly type?: components["schemas"]["deployment-reviewer-type"]; /** The id of the user or team who can review the deployment */ readonly id?: number; - } & { readonly [key: string]: any })[]; + }[]; readonly deployment_branch_policy?: components["schemas"]["deployment_branch_policy"]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -22160,7 +22086,7 @@ export interface operations { readonly "application/json": { /** Optional parameter to specify the organization name if forking into an organization. */ readonly organization?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -22193,7 +22119,7 @@ export interface operations { readonly content: string; /** The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. */ readonly encoding?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -22291,7 +22217,7 @@ export interface operations { readonly email?: string; /** 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`. */ readonly date?: string; - } & { readonly [key: string]: any }; + }; /** 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. */ readonly committer?: { /** The name of the author (or committer) of the commit */ @@ -22300,10 +22226,10 @@ export interface operations { readonly email?: string; /** 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`. */ readonly date?: string; - } & { readonly [key: string]: any }; + }; /** 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. */ readonly signature?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -22444,7 +22370,7 @@ export interface operations { /** The SHA1 value for this reference. */ readonly sha: string; readonly key?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -22488,7 +22414,7 @@ export interface operations { readonly sha: string; /** 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. */ readonly force?: boolean; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -22562,8 +22488,8 @@ export interface operations { readonly email?: string; /** 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`. */ readonly date?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; }; }; }; @@ -22645,7 +22571,7 @@ export interface operations { readonly content: { readonly "application/json": { /** Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ - readonly tree: readonly ({ + readonly tree: readonly { /** The file referenced in the tree. */ readonly path?: string; /** 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. */ @@ -22664,13 +22590,13 @@ export interface operations { * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. */ readonly content?: string; - } & { readonly [key: string]: any })[]; + }[]; /** * 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. */ readonly base_tree?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -22764,12 +22690,12 @@ export interface operations { readonly insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; readonly token?: string; readonly digest?: string; - } & { readonly [key: string]: any }; + }; /** Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. */ readonly events?: readonly string[]; /** Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. */ readonly active?: boolean; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -22836,7 +22762,7 @@ export interface operations { readonly insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; readonly address?: string; readonly room?: string; - } & { readonly [key: string]: any }; + }; /** Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. */ readonly events?: readonly string[]; /** Determines a list of events to be added to the list of events that the Hook triggers for. */ @@ -22845,7 +22771,7 @@ export interface operations { readonly remove_events?: readonly string[]; /** Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. */ readonly active?: boolean; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -22899,7 +22825,7 @@ export interface operations { readonly content_type?: components["schemas"]["webhook-config-content-type"]; readonly secret?: components["schemas"]["webhook-config-secret"]; readonly insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -23024,7 +22950,7 @@ export interface operations { readonly vcs_password?: string; /** For a tfvc import, the name of the project that is being imported. */ readonly tfvc_project?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -23069,7 +22995,7 @@ export interface operations { readonly vcs_password?: string; readonly vcs?: string; readonly tfvc_project?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -23126,7 +23052,7 @@ export interface operations { /** The new Git author name. */ readonly name?: string; readonly remote_id?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -23169,7 +23095,7 @@ export interface operations { readonly "application/json": { /** 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). */ readonly use_lfs: "opt_in" | "opt_out"; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -23312,7 +23238,7 @@ export interface operations { readonly "application/json": { /** The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. */ readonly permissions?: "read" | "write" | "maintain" | "triage" | "admin"; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -23400,25 +23326,25 @@ export interface operations { readonly content: { readonly "application/json": { /** The title of the issue. */ - readonly title: (string | number) & { readonly [key: string]: any }; + readonly title: string | number; /** The contents of the issue. */ readonly body?: string; /** 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.**_ */ readonly assignee?: string | null; - readonly milestone?: ((string | number) & { readonly [key: string]: any }) | null; + readonly milestone?: (string | number) | null; /** Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ */ - readonly labels?: readonly (( + readonly labels?: readonly ( | string - | ({ + | { readonly id?: number; readonly name?: string; readonly description?: string | null; readonly color?: string | null; - } & { readonly [key: string]: any }) - ) & { readonly [key: string]: any })[]; + } + )[]; /** 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._ */ readonly assignees?: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -23510,7 +23436,7 @@ export interface operations { readonly "application/json": { /** The contents of the comment. */ readonly body: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -23575,7 +23501,7 @@ export interface operations { readonly "application/json": { /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment. */ readonly content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -23706,27 +23632,27 @@ export interface operations { readonly content: { readonly "application/json": { /** The title of the issue. */ - readonly title?: ((string | number) & { readonly [key: string]: any }) | null; + readonly title?: (string | number) | null; /** The contents of the issue. */ readonly body?: string | null; /** Login for the user that this issue should be assigned to. **This field is deprecated.** */ readonly assignee?: string | null; /** State of the issue. Either `open` or `closed`. */ readonly state?: "open" | "closed"; - readonly milestone?: ((string | number) & { readonly [key: string]: any }) | null; + readonly milestone?: (string | number) | null; /** 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._ */ - readonly labels?: readonly (( + readonly labels?: readonly ( | string - | ({ + | { readonly id?: number; readonly name?: string; readonly description?: string | null; readonly color?: string | null; - } & { readonly [key: string]: any }) - ) & { readonly [key: string]: any })[]; + } + )[]; /** 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._ */ readonly assignees?: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -23753,7 +23679,7 @@ export interface operations { readonly "application/json": { /** 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._ */ readonly assignees?: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -23780,7 +23706,7 @@ export interface operations { readonly "application/json": { /** 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._ */ readonly assignees?: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -23844,7 +23770,7 @@ export interface operations { readonly "application/json": { /** The contents of the comment. */ readonly body: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -23925,7 +23851,7 @@ export interface operations { readonly "application/json": { /** The names of the labels to add to the issue. You can pass an empty array to remove all labels. **Note:** 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. */ readonly labels?: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -23953,7 +23879,7 @@ export interface operations { readonly "application/json": { /** The name of the label to add to the issue. Must contain at least one label. **Note:** 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. */ readonly labels: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -24018,18 +23944,16 @@ export interface operations { }; readonly requestBody: { readonly content: { - readonly "application/json": - | ({ - /** - * 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` - */ - readonly lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; - } & { readonly [key: string]: any }) - | null; + readonly "application/json": { + /** + * 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` + */ + readonly lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; + } | null; }; }; }; @@ -24106,7 +24030,7 @@ export interface operations { readonly "application/json": { /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue. */ readonly content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -24214,7 +24138,7 @@ export interface operations { * 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://help.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://help.github.com/articles/permission-levels-for-a-user-account-repository/)." */ readonly read_only?: boolean; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -24305,7 +24229,7 @@ export interface operations { readonly color?: string; /** A short description of the label. */ readonly description?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -24365,7 +24289,7 @@ export interface operations { readonly color?: string; /** A short description of the label. */ readonly description?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -24428,7 +24352,7 @@ export interface operations { readonly "application/json": { readonly message?: string; readonly documentation_url?: string; - } & { readonly [key: string]: any }; + }; }; }; /** Merge conflict response */ @@ -24437,7 +24361,7 @@ export interface operations { readonly "application/json": { readonly message?: string; readonly documentation_url?: string; - } & { readonly [key: string]: any }; + }; }; }; readonly 422: components["responses"]["validation_failed"]; @@ -24451,7 +24375,7 @@ export interface operations { readonly head: string; /** Commit message to use for the merge commit. If omitted, a default message will be used. */ readonly commit_message?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -24516,7 +24440,7 @@ export interface operations { readonly description?: string; /** The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ readonly due_on?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -24582,7 +24506,7 @@ export interface operations { readonly description?: string; /** The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ readonly due_on?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -24660,7 +24584,7 @@ export interface operations { readonly "application/json": { /** 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. */ readonly last_read_at?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -24702,16 +24626,14 @@ export interface operations { readonly cname?: string | null; /** 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. */ readonly public?: boolean; - readonly source: (Partial<"gh-pages" | "master" | "master /docs"> & - Partial< - { - /** The repository branch used to publish your site's source files. */ - readonly branch: string; - /** The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. */ - readonly path: "/" | "/docs"; - } & { readonly [key: string]: any } - >) & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + readonly source: Partial<"gh-pages" | "master" | "master /docs"> & + Partial<{ + /** The repository branch used to publish your site's source files. */ + readonly branch: string; + /** The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. */ + readonly path: "/" | "/docs"; + }>; + }; }; }; }; @@ -24743,8 +24665,8 @@ export interface operations { readonly branch: string; /** The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` */ readonly path?: "/" | "/docs"; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; }; }; }; @@ -24899,7 +24821,7 @@ export interface operations { readonly name: string; /** The description of the project. */ readonly body?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -24984,7 +24906,7 @@ export interface operations { /** Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ readonly draft?: boolean; readonly issue?: number; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -25077,7 +24999,7 @@ export interface operations { readonly "application/json": { /** The text of the reply to the review comment. */ readonly body: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -25142,7 +25064,7 @@ export interface operations { readonly "application/json": { /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment. */ readonly content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -25239,7 +25161,7 @@ export interface operations { readonly base?: string; /** Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ readonly maintainer_can_modify?: boolean; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -25324,7 +25246,7 @@ export interface operations { /** **Required when using multi-line comments**. 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://help.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. */ readonly start_side?: "LEFT" | "RIGHT" | "side"; readonly in_reply_to?: number; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -25360,7 +25282,7 @@ export interface operations { readonly "application/json": { /** The text of the review comment. */ readonly body: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -25455,7 +25377,7 @@ export interface operations { readonly "application/json": { readonly message?: string; readonly documentation_url?: string; - } & { readonly [key: string]: any }; + }; }; }; /** Response if sha was provided and pull request head did not match */ @@ -25464,25 +25386,23 @@ export interface operations { readonly "application/json": { readonly message?: string; readonly documentation_url?: string; - } & { readonly [key: string]: any }; + }; }; }; readonly 422: components["responses"]["validation_failed"]; }; readonly requestBody: { readonly content: { - readonly "application/json": - | ({ - /** Title for the automatic commit message. */ - readonly commit_title?: string; - /** Extra detail to append to automatic commit message. */ - readonly commit_message?: string; - /** SHA that pull request head must match to allow merge. */ - readonly sha?: string; - /** Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. */ - readonly merge_method?: "merge" | "squash" | "rebase"; - } & { readonly [key: string]: any }) - | null; + readonly "application/json": { + /** Title for the automatic commit message. */ + readonly commit_title?: string; + /** Extra detail to append to automatic commit message. */ + readonly commit_message?: string; + /** SHA that pull request head must match to allow merge. */ + readonly sha?: string; + /** Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. */ + readonly merge_method?: "merge" | "squash" | "rebase"; + } | null; }; }; }; @@ -25538,7 +25458,7 @@ export interface operations { readonly reviewers?: readonly string[]; /** An array of team `slug`s that will be requested. */ readonly team_reviewers?: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -25562,7 +25482,7 @@ export interface operations { readonly reviewers: readonly string[]; /** An array of team `slug`s that will be removed. */ readonly team_reviewers?: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -25628,7 +25548,7 @@ export interface operations { /** 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. */ readonly event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; /** Use the following table to specify the location, destination, and contents of the draft review comment. */ - readonly comments?: readonly ({ + readonly comments?: readonly { /** The relative path to the file that necessitates a review comment. */ readonly path: string; /** 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. */ @@ -25639,8 +25559,8 @@ export interface operations { readonly side?: string; readonly start_line?: number; readonly start_side?: string; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; }; }; }; @@ -25689,7 +25609,7 @@ export interface operations { readonly "application/json": { /** The body text of the pull request review. */ readonly body: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -25769,7 +25689,7 @@ export interface operations { /** The message for the pull request review dismissal */ readonly message: string; readonly event?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -25801,7 +25721,7 @@ export interface operations { readonly body?: string; /** 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. */ readonly event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -25821,7 +25741,7 @@ export interface operations { readonly "application/json": { readonly message?: string; readonly url?: string; - } & { readonly [key: string]: any }; + }; }; }; readonly 403: components["responses"]["forbidden"]; @@ -25830,12 +25750,10 @@ export interface operations { }; readonly requestBody: { readonly content: { - readonly "application/json": - | ({ - /** 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. */ - readonly expected_head_sha?: string; - } & { readonly [key: string]: any }) - | null; + readonly "application/json": { + /** 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. */ + readonly expected_head_sha?: string; + } | null; }; }; }; @@ -25934,7 +25852,7 @@ export interface operations { readonly draft?: boolean; /** `true` to identify the release as a prerelease. `false` to identify the release as a full release. */ readonly prerelease?: boolean; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -26000,7 +25918,7 @@ export interface operations { /** An alternate short description of the asset. Used in place of the filename. */ readonly label?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -26113,7 +26031,7 @@ export interface operations { readonly draft?: boolean; /** `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ readonly prerelease?: boolean; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -26279,7 +26197,7 @@ export interface operations { readonly "application/json": { readonly state: components["schemas"]["secret-scanning-alert-state"]; readonly resolution?: components["schemas"]["secret-scanning-alert-resolution"]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -26462,7 +26380,7 @@ export interface operations { readonly description?: string; /** A string label to differentiate this status from the status of other systems. This field is case-insensitive. */ readonly context?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -26532,7 +26450,7 @@ export interface operations { readonly subscribed?: boolean; /** Determines if all notifications should be blocked from this repository. */ readonly ignored?: boolean; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -26655,7 +26573,7 @@ export interface operations { readonly "application/json": { /** 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. */ readonly names: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -26762,7 +26680,7 @@ export interface operations { readonly new_owner: string; /** ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */ readonly team_ids?: readonly number[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -26867,7 +26785,7 @@ export interface operations { readonly include_all_branches?: boolean; /** Either `true` to create a new private repository or `false` to create a new public one. */ readonly private?: boolean; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -26920,7 +26838,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly secrets: readonly components["schemas"]["actions-secret"][]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -27063,7 +26981,7 @@ export interface operations { readonly encrypted_value?: string; /** ID of the key you used to encrypt the secret. */ readonly key_id?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -27133,11 +27051,11 @@ export interface operations { readonly schemas: readonly string[]; /** The name of the SCIM group. This must match the GitHub organization that the group maps to. */ readonly displayName: string; - readonly members?: readonly ({ + readonly members?: readonly { /** The SCIM user ID for a user. */ readonly value: string; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; }; }; }; @@ -27189,11 +27107,11 @@ export interface operations { readonly schemas: readonly string[]; /** The name of the SCIM group. This must match the GitHub organization that the group maps to. */ readonly displayName: string; - readonly members?: readonly ({ + readonly members?: readonly { /** The SCIM user ID for a user. */ readonly value: string; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; }; }; }; @@ -27241,7 +27159,7 @@ export interface operations { readonly schemas: readonly string[]; /** Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ readonly Operations: readonly { readonly [key: string]: any }[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -27321,21 +27239,21 @@ export interface operations { readonly givenName: string; /** The last name of the user. */ readonly familyName: string; - } & { readonly [key: string]: any }; + }; /** List of user emails. */ - readonly emails: readonly ({ + readonly emails: readonly { /** The email address. */ readonly value: string; /** The type of email address. */ readonly type: string; /** Whether this email address is the primary address. */ readonly primary: boolean; - } & { readonly [key: string]: any })[]; + }[]; /** List of SCIM group IDs the user is a member of. */ - readonly groups?: readonly ({ + readonly groups?: readonly { readonly value?: string; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; }; }; }; @@ -27396,21 +27314,21 @@ export interface operations { readonly givenName: string; /** The last name of the user. */ readonly familyName: string; - } & { readonly [key: string]: any }; + }; /** List of user emails. */ - readonly emails: readonly ({ + readonly emails: readonly { /** The email address. */ readonly value: string; /** The type of email address. */ readonly type: string; /** Whether this email address is the primary address. */ readonly primary: boolean; - } & { readonly [key: string]: any })[]; + }[]; /** List of SCIM group IDs the user is a member of. */ - readonly groups?: readonly ({ + readonly groups?: readonly { readonly value?: string; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; }; }; }; @@ -27473,7 +27391,7 @@ export interface operations { readonly schemas: readonly string[]; /** Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ readonly Operations: readonly { readonly [key: string]: any }[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -27562,18 +27480,18 @@ export interface operations { readonly givenName: string; readonly familyName: string; readonly formatted?: string; - } & { readonly [key: string]: any }; + }; /** user emails */ - readonly emails: readonly ({ + readonly emails: readonly { readonly value: string; readonly primary?: boolean; readonly type?: string; - } & { readonly [key: string]: any })[]; + }[]; readonly schemas?: readonly string[]; readonly externalId?: string; readonly groups?: readonly string[]; readonly active?: boolean; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -27638,14 +27556,14 @@ export interface operations { readonly givenName: string; readonly familyName: string; readonly formatted?: string; - } & { readonly [key: string]: any }; + }; /** user emails */ - readonly emails: readonly ({ + readonly emails: readonly { readonly type?: string; readonly value: string; readonly primary?: boolean; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; }; }; }; @@ -27714,25 +27632,24 @@ export interface operations { readonly "application/json": { readonly schemas?: readonly string[]; /** Set of operations to be performed */ - readonly Operations: readonly ({ + readonly Operations: readonly { readonly op: "add" | "remove" | "replace"; readonly path?: string; - readonly value?: ( - | ({ + readonly value?: + | { readonly active?: boolean | null; readonly userName?: string | null; readonly externalId?: string | null; readonly givenName?: string | null; readonly familyName?: string | null; - } & { readonly [key: string]: any }) - | readonly ({ + } + | readonly { readonly value?: string; readonly primary?: boolean; - } & { readonly [key: string]: any })[] - | string - ) & { readonly [key: string]: any }; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[] + | string; + }[]; + }; }; }; }; @@ -27779,7 +27696,7 @@ export interface operations { readonly total_count: number; readonly incomplete_results: boolean; readonly items: readonly components["schemas"]["code-search-result-item"][]; - } & { readonly [key: string]: any }; + }; }; }; readonly 304: components["responses"]["not_modified"]; @@ -27821,7 +27738,7 @@ export interface operations { readonly total_count: number; readonly incomplete_results: boolean; readonly items: readonly components["schemas"]["commit-search-result-item"][]; - } & { readonly [key: string]: any }; + }; }; }; readonly 304: components["responses"]["not_modified"]; @@ -27876,7 +27793,7 @@ export interface operations { readonly total_count: number; readonly incomplete_results: boolean; readonly items: readonly components["schemas"]["issue-search-result-item"][]; - } & { readonly [key: string]: any }; + }; }; }; readonly 304: components["responses"]["not_modified"]; @@ -27917,7 +27834,7 @@ export interface operations { readonly total_count: number; readonly incomplete_results: boolean; readonly items: readonly components["schemas"]["label-search-result-item"][]; - } & { readonly [key: string]: any }; + }; }; }; readonly 304: components["responses"]["not_modified"]; @@ -27964,7 +27881,7 @@ export interface operations { readonly total_count: number; readonly incomplete_results: boolean; readonly items: readonly components["schemas"]["repo-search-result-item"][]; - } & { readonly [key: string]: any }; + }; }; }; readonly 304: components["responses"]["not_modified"]; @@ -27998,7 +27915,7 @@ export interface operations { readonly total_count: number; readonly incomplete_results: boolean; readonly items: readonly components["schemas"]["topic-search-result-item"][]; - } & { readonly [key: string]: any }; + }; }; }; readonly 304: components["responses"]["not_modified"]; @@ -28039,7 +27956,7 @@ export interface operations { readonly total_count: number; readonly incomplete_results: boolean; readonly items: readonly components["schemas"]["user-search-result-item"][]; - } & { readonly [key: string]: any }; + }; }; }; readonly 304: components["responses"]["not_modified"]; @@ -28133,7 +28050,7 @@ export interface operations { readonly permission?: "pull" | "push" | "admin"; /** The ID of a team to set as the parent team. */ readonly parent_team_id?: number | null; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -28196,7 +28113,7 @@ export interface operations { readonly body: string; /** 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. */ readonly private?: boolean; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -28265,7 +28182,7 @@ export interface operations { readonly title?: string; /** The discussion post's body text. */ readonly body?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -28326,7 +28243,7 @@ export interface operations { readonly "application/json": { /** The discussion comment's body text. */ readonly body: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -28396,7 +28313,7 @@ export interface operations { readonly "application/json": { /** The discussion comment's body text. */ readonly body: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -28457,7 +28374,7 @@ export interface operations { readonly "application/json": { /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. */ readonly content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -28516,7 +28433,7 @@ export interface operations { readonly "application/json": { /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. */ readonly content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -28634,13 +28551,13 @@ export interface operations { readonly content: { readonly "application/json": { readonly message?: string; - readonly errors?: readonly ({ + readonly errors?: readonly { readonly code?: string; readonly field?: string; readonly resource?: string; - } & { readonly [key: string]: any })[]; + }[]; readonly documentation_url?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -28731,13 +28648,13 @@ export interface operations { readonly content: { readonly "application/json": { readonly message?: string; - readonly errors?: readonly ({ + readonly errors?: readonly { readonly code?: string; readonly field?: string; readonly resource?: string; - } & { readonly [key: string]: any })[]; + }[]; readonly documentation_url?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -28750,7 +28667,7 @@ export interface operations { * \* `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. */ readonly role?: "member" | "maintainer"; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -28851,7 +28768,7 @@ export interface operations { readonly "application/json": { readonly message?: string; readonly documentation_url?: string; - } & { readonly [key: string]: any }; + }; }; }; readonly 404: components["responses"]["not_found"]; @@ -28869,7 +28786,7 @@ export interface operations { * 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)." */ readonly permission?: "read" | "write" | "admin"; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -28978,7 +28895,7 @@ export interface operations { * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. */ readonly permission?: "pull" | "push" | "admin"; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -29051,7 +28968,7 @@ export interface operations { readonly content: { readonly "application/json": { /** 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. */ - readonly groups: readonly ({ + readonly groups: readonly { /** ID of the IdP group. */ readonly group_id: string; /** Name of the IdP group. */ @@ -29061,9 +28978,9 @@ export interface operations { readonly id?: string; readonly name?: string; readonly description?: string; - } & { readonly [key: string]: any })[]; + }[]; readonly synced_at?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -29104,10 +29021,7 @@ export interface operations { /** response */ readonly 200: { readonly content: { - readonly "application/json": ( - | components["schemas"]["private-user"] - | components["schemas"]["public-user"] - ) & { readonly [key: string]: any }; + readonly "application/json": components["schemas"]["private-user"] | components["schemas"]["public-user"]; }; }; readonly 304: components["responses"]["not_modified"]; @@ -29150,7 +29064,7 @@ export interface operations { readonly hireable?: boolean; /** The new short biography of the user. */ readonly bio?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -29245,7 +29159,7 @@ export interface operations { readonly email: string; /** Denotes whether an email is publically visible. */ readonly visibility: "public" | "private"; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -29291,14 +29205,13 @@ export interface operations { }; readonly requestBody: { readonly content: { - readonly "application/json": ( - | ({ + readonly "application/json": + | { /** 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. */ readonly emails: readonly string[]; - } & { readonly [key: string]: any }) + } | readonly string[] - | string - ) & { readonly [key: string]: any }; + | string; }; }; }; @@ -29316,14 +29229,13 @@ export interface operations { }; readonly requestBody: { readonly content: { - readonly "application/json": ( - | ({ + readonly "application/json": + | { /** Email addresses associated with the GitHub user account. */ readonly emails: readonly string[]; - } & { readonly [key: string]: any }) + } | readonly string[] - | string - ) & { readonly [key: string]: any }; + | string; }; }; }; @@ -29474,7 +29386,7 @@ export interface operations { readonly "application/json": { /** A GPG key in ASCII-armored format. */ readonly armored_public_key: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -29543,7 +29455,7 @@ export interface operations { readonly "application/json": { readonly total_count: number; readonly installations: readonly components["schemas"]["installation"][]; - } & { readonly [key: string]: any }; + }; }; }; readonly 304: components["responses"]["not_modified"]; @@ -29583,7 +29495,7 @@ export interface operations { readonly total_count: number; readonly repository_selection?: string; readonly repositories: readonly components["schemas"]["repository"][]; - } & { readonly [key: string]: any }; + }; }; }; readonly 304: components["responses"]["not_modified"]; @@ -29763,7 +29675,7 @@ export interface operations { readonly title?: string; /** The public SSH key to add to your GitHub account. */ readonly key: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -29914,7 +29826,7 @@ export interface operations { readonly "application/json": { /** The state that the membership should be in. Only `"active"` will be accepted. */ readonly state: "active"; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -29966,7 +29878,7 @@ export interface operations { /** Exclude attributes from the API response to improve performance */ readonly exclude?: readonly "repositories"[]; readonly repositories: readonly string[]; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -30332,7 +30244,7 @@ export interface operations { readonly name: string; /** Body of the project */ readonly body?: string | null; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -30476,7 +30388,7 @@ export interface operations { readonly has_downloads?: boolean; /** Whether this repository acts as a template that can be used to generate new repositories. */ readonly is_template?: boolean; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -30714,10 +30626,7 @@ export interface operations { /** response */ readonly 200: { readonly content: { - readonly "application/json": ( - | components["schemas"]["private-user"] - | components["schemas"]["public-user"] - ) & { readonly [key: string]: any }; + readonly "application/json": components["schemas"]["private-user"] | components["schemas"]["public-user"]; }; }; readonly 404: components["responses"]["not_found"]; diff --git a/tests/v3/expected/github.ts b/tests/v3/expected/github.ts index db97aa21d..1e8e3892d 100644 --- a/tests/v3/expected/github.ts +++ b/tests/v3/expected/github.ts @@ -5132,29 +5132,27 @@ export interface paths { export interface components { schemas: { /** Simple User */ - "simple-user": - | ({ - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string | null; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - starred_at?: string; - } & { [key: string]: any }) - | null; + "simple-user": { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string | null; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + starred_at?: string; + } | null; /** 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: { /** Unique identifier of the GitHub app */ @@ -5162,7 +5160,7 @@ export interface components { /** The slug name of the GitHub app */ slug?: string; node_id: string; - owner: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + owner: components["schemas"]["simple-user"] | null; /** The name of the GitHub app */ name: string; description: string | null; @@ -5191,13 +5189,13 @@ export interface components { "basic-error": { message?: string; documentation_url?: string; - } & { [key: string]: any }; + }; /** Validation Error Simple */ "validation-error-simple": { message: string; documentation_url: string; errors?: string[]; - } & { [key: string]: any }; + }; /** The URL to which the payloads will be delivered. */ "webhook-config-url": string; /** The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. */ @@ -5212,7 +5210,7 @@ export interface components { content_type?: components["schemas"]["webhook-config-content-type"]; secret?: components["schemas"]["webhook-config-secret"]; insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; - } & { [key: string]: any }; + }; /** An enterprise account */ enterprise: { /** A short description of the enterprise. */ @@ -5230,16 +5228,12 @@ export interface components { created_at: string | null; updated_at: string | null; avatar_url: string; - } & { [key: string]: any }; + }; /** Installation */ installation: { /** The ID of the installation. */ id: number; - account: - | ((Partial & Partial) & { - [key: string]: any; - }) - | null; + account: (Partial & Partial) | null; /** Describe whether all repositories have been selected or there's a selection involved */ repository_selection: "all" | "selected"; access_tokens_url: string; @@ -5258,7 +5252,7 @@ export interface components { statuses?: string; issues?: string; organization_administration?: string; - } & { [key: string]: any }; + }; events: string[]; created_at: string; updated_at: string; @@ -5266,10 +5260,10 @@ export interface components { has_multiple_single_files?: boolean; single_file_paths?: string[]; app_slug: string; - suspended_by?: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + suspended_by?: components["schemas"]["simple-user"] | null; suspended_at?: string | null; contact_email?: string | null; - } & { [key: string]: any }; + }; /** The permissions granted to the user-to-server access token. */ "app-permissions": { /** The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be one of: `read` or `write`. */ @@ -5332,7 +5326,7 @@ export interface components { organization_user_blocking?: "read" | "write"; /** The level of permission to grant the access token to manage team discussions and related comments. Can be one of: `read` or `write`. */ team_discussions?: "read" | "write"; - } & { [key: string]: any }; + }; /** License Simple */ "license-simple": { key: string; @@ -5341,7 +5335,7 @@ export interface components { spdx_id: string | null; node_id: string; html_url?: string; - } & { [key: string]: any }; + }; /** A git repository */ repository: { /** Unique identifier of the repository */ @@ -5350,7 +5344,7 @@ export interface components { /** The name of the repository. */ name: string; full_name: string; - license: (components["schemas"]["license-simple"] & { [key: string]: any }) | null; + license: components["schemas"]["license-simple"] | null; forks: number; permissions?: { admin: boolean; @@ -5358,8 +5352,8 @@ export interface components { triage?: boolean; push: boolean; maintain?: boolean; - } & { [key: string]: any }; - owner: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + }; + owner: components["schemas"]["simple-user"] | null; /** Whether the repository is private or public. */ private: boolean; html_url: string; @@ -5439,113 +5433,111 @@ export interface components { updated_at: string | null; /** Whether to allow rebase merges for pull requests. */ allow_rebase_merge?: boolean; - template_repository?: - | ({ - id?: number; - node_id?: string; - name?: string; - full_name?: string; - owner?: { - login?: string; - id?: number; - node_id?: string; - avatar_url?: string; - gravatar_id?: string; - url?: string; - html_url?: string; - followers_url?: string; - following_url?: string; - gists_url?: string; - starred_url?: string; - subscriptions_url?: string; - organizations_url?: string; - repos_url?: string; - events_url?: string; - received_events_url?: string; - type?: string; - site_admin?: boolean; - } & { [key: string]: any }; - private?: boolean; - html_url?: string; - description?: string; - fork?: boolean; - url?: string; - archive_url?: string; - assignees_url?: string; - blobs_url?: string; - branches_url?: string; - collaborators_url?: string; - comments_url?: string; - commits_url?: string; - compare_url?: string; - contents_url?: string; - contributors_url?: string; - deployments_url?: string; - downloads_url?: string; - events_url?: string; - forks_url?: string; - git_commits_url?: string; - git_refs_url?: string; - git_tags_url?: string; - git_url?: string; - issue_comment_url?: string; - issue_events_url?: string; - issues_url?: string; - keys_url?: string; - labels_url?: string; - languages_url?: string; - merges_url?: string; - milestones_url?: string; - notifications_url?: string; - pulls_url?: string; - releases_url?: string; - ssh_url?: string; - stargazers_url?: string; - statuses_url?: string; - subscribers_url?: string; - subscription_url?: string; - tags_url?: string; - teams_url?: string; - trees_url?: string; - clone_url?: string; - mirror_url?: string; - hooks_url?: string; - svn_url?: string; - homepage?: string; - language?: string; - forks_count?: number; - stargazers_count?: number; - watchers_count?: number; - size?: number; - default_branch?: string; - open_issues_count?: number; - is_template?: boolean; - topics?: string[]; - has_issues?: boolean; - has_projects?: boolean; - has_wiki?: boolean; - has_pages?: boolean; - has_downloads?: boolean; - archived?: boolean; - disabled?: boolean; - visibility?: string; - pushed_at?: string; - created_at?: string; - updated_at?: string; - permissions?: { - admin?: boolean; - push?: boolean; - pull?: boolean; - } & { [key: string]: any }; - allow_rebase_merge?: boolean; - temp_clone_token?: string; - allow_squash_merge?: boolean; - delete_branch_on_merge?: boolean; - allow_merge_commit?: boolean; - subscribers_count?: number; - network_count?: number; - } & { [key: string]: any }) - | null; + template_repository?: { + id?: number; + node_id?: string; + name?: string; + full_name?: string; + owner?: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }; + private?: boolean; + html_url?: string; + description?: string; + fork?: boolean; + url?: string; + archive_url?: string; + assignees_url?: string; + blobs_url?: string; + branches_url?: string; + collaborators_url?: string; + comments_url?: string; + commits_url?: string; + compare_url?: string; + contents_url?: string; + contributors_url?: string; + deployments_url?: string; + downloads_url?: string; + events_url?: string; + forks_url?: string; + git_commits_url?: string; + git_refs_url?: string; + git_tags_url?: string; + git_url?: string; + issue_comment_url?: string; + issue_events_url?: string; + issues_url?: string; + keys_url?: string; + labels_url?: string; + languages_url?: string; + merges_url?: string; + milestones_url?: string; + notifications_url?: string; + pulls_url?: string; + releases_url?: string; + ssh_url?: string; + stargazers_url?: string; + statuses_url?: string; + subscribers_url?: string; + subscription_url?: string; + tags_url?: string; + teams_url?: string; + trees_url?: string; + clone_url?: string; + mirror_url?: string; + hooks_url?: string; + svn_url?: string; + homepage?: string; + language?: string; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + pushed_at?: string; + created_at?: string; + updated_at?: string; + permissions?: { + admin?: boolean; + push?: boolean; + pull?: boolean; + }; + allow_rebase_merge?: boolean; + temp_clone_token?: string; + allow_squash_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_merge_commit?: boolean; + subscribers_count?: number; + network_count?: number; + } | null; temp_clone_token?: string; /** Whether to allow squash merges for pull requests. */ allow_squash_merge?: boolean; @@ -5559,7 +5551,7 @@ export interface components { watchers: number; master_branch?: string; starred_at?: string; - } & { [key: string]: any }; + }; /** Authentication token for a GitHub App installed on a user or org. */ "installation-token": { token: string; @@ -5569,26 +5561,26 @@ export interface components { contents?: string; metadata?: string; single_file?: string; - } & { [key: string]: any }; + }; repository_selection?: "all" | "selected"; repositories?: components["schemas"]["repository"][]; single_file?: string; has_multiple_single_files?: boolean; single_file_paths?: string[]; - } & { [key: string]: any }; + }; /** Validation Error */ "validation-error": { message: string; documentation_url: string; - errors?: ({ + errors?: { resource?: string; field?: string; message?: string; code: string; index?: number; - value?: ((string | null) | (number | null) | (string[] | null)) & { [key: string]: any }; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + value?: (string | null) | (number | null) | (string[] | null); + }[]; + }; /** The authorization associated with an OAuth Access. */ "application-grant": { id: number; @@ -5597,12 +5589,12 @@ export interface components { client_id: string; name: string; url: string; - } & { [key: string]: any }; + }; created_at: string; updated_at: string; scopes: string[]; - user?: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; - } & { [key: string]: any }; + user?: components["schemas"]["simple-user"] | null; + }; "scoped-installation": { permissions: components["schemas"]["app-permissions"]; /** Describe whether all repositories have been selected or there's a selection involved */ @@ -5612,7 +5604,7 @@ export interface components { single_file_paths?: string[]; repositories_url: string; account: components["schemas"]["simple-user"]; - } & { [key: string]: any }; + }; /** The authorization for an OAuth app, GitHub App, or a Personal Access Token. */ authorization: { id: number; @@ -5626,15 +5618,15 @@ export interface components { client_id: string; name: string; url: string; - } & { [key: string]: any }; + }; note: string | null; note_url: string | null; updated_at: string; created_at: string; fingerprint: string | null; - user?: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; - installation?: (components["schemas"]["scoped-installation"] & { [key: string]: any }) | null; - } & { [key: string]: any }; + user?: components["schemas"]["simple-user"] | null; + installation?: components["schemas"]["scoped-installation"] | null; + }; /** Code Of Conduct */ "code-of-conduct": { key: string; @@ -5642,7 +5634,7 @@ export interface components { url: string; body?: string; html_url: string | null; - } & { [key: string]: any }; + }; /** Content Reference attachments allow you to provide context around URLs posted in comments */ "content-reference-attachment": { /** The ID of the attachment */ @@ -5653,7 +5645,7 @@ export interface components { body: string; /** The node_id of the content attachment */ node_id?: string; - } & { [key: string]: any }; + }; /** The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. */ "enabled-organizations": "all" | "none" | "selected"; /** The permissions policy that controls the actions that are allowed to run. Can be one of: `all`, `local_only`, or `selected`. */ @@ -5666,7 +5658,7 @@ export interface components { selected_organizations_url?: string; allowed_actions: components["schemas"]["allowed-actions"]; selected_actions_url?: components["schemas"]["selected-actions-url"]; - } & { [key: string]: any }; + }; /** Organization Simple */ "organization-simple": { login: string; @@ -5681,7 +5673,7 @@ export interface components { public_members_url: string; avatar_url: string; description: string | null; - } & { [key: string]: any }; + }; "selected-actions": { /** Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. */ github_owned_allowed: boolean; @@ -5689,7 +5681,7 @@ export interface components { verified_allowed: boolean; /** 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[]; - } & { [key: string]: any }; + }; "runner-groups-enterprise": { id: number; name: string; @@ -5698,7 +5690,7 @@ export interface components { selected_organizations_url?: string; runners_url: string; allows_public_repositories: boolean; - } & { [key: string]: any }; + }; /** A self hosted runner */ runner: { /** The id of the runner. */ @@ -5710,22 +5702,22 @@ export interface components { /** The status of the runner. */ status: string; busy: boolean; - labels: ({ + labels: { /** Unique identifier of the label. */ id?: number; /** Name of the label. */ name?: string; /** The type of label. Read-only labels are applied automatically when the runner is configured. */ type?: "read-only" | "custom"; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; /** Runner Application */ "runner-application": { os: string; architecture: string; download_url: string; filename: string; - } & { [key: string]: any }; + }; /** Authentication Token */ "authentication-token": { /** The token used for authentication */ @@ -5738,7 +5730,7 @@ export interface components { single_file?: string | null; /** Describe whether all repositories have been selected or there's a selection involved */ repository_selection?: "all" | "selected"; - } & { [key: string]: any }; + }; "audit-log-event": { /** The time the audit log event occurred, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). */ "@timestamp"?: number; @@ -5786,7 +5778,7 @@ export interface components { user?: string; /** The repository visibility, for example `public` or `private`. */ visibility?: string; - } & { [key: string]: any }; + }; "actions-billing-usage": { /** The sum of the free and paid GitHub Actions minutes used. */ total_minutes_used: number; @@ -5801,8 +5793,8 @@ export interface components { MACOS?: number; /** Total minutes used on Windows runner machines. */ WINDOWS?: number; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; "packages-billing-usage": { /** Sum of the free and paid storage space (GB) for GitHuub Packages. */ total_gigabytes_bandwidth_used: number; @@ -5810,7 +5802,7 @@ export interface components { total_paid_gigabytes_bandwidth_used: number; /** Free storage space (GB) for GitHub Packages. */ included_gigabytes_bandwidth: number; - } & { [key: string]: any }; + }; "combined-billing-usage": { /** Numbers of days left in billing cycle. */ days_left_in_billing_cycle: number; @@ -5818,7 +5810,7 @@ export interface components { estimated_paid_storage_for_month: number; /** Estimated sum of free and paid storage space (GB) used in billing cycle. */ estimated_storage_for_month: number; - } & { [key: string]: any }; + }; /** Actor */ actor: { id: number; @@ -5827,7 +5819,7 @@ export interface components { gravatar_id: string | null; url: string; avatar_url: string; - } & { [key: string]: any }; + }; /** Color-coded labels help you categorize and filter your issues (just like labels in Gmail). */ label: { id: number; @@ -5840,7 +5832,7 @@ export interface components { /** 6-character hex code, without the leading #, identifying the color */ color: string; default: boolean; - } & { [key: string]: any }; + }; /** A collection of related issues and pull requests. */ milestone: { url: string; @@ -5855,14 +5847,14 @@ export interface components { /** The title of the milestone. */ title: string; description: string | null; - creator: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + creator: components["schemas"]["simple-user"] | null; open_issues: number; closed_issues: number; created_at: string; updated_at: string; closed_at: string | null; due_on: string | null; - } & { [key: string]: any }; + }; /** How the author is associated with the repository. */ author_association: | "COLLABORATOR" @@ -5887,11 +5879,11 @@ export interface components { state: string; title: string; body?: string; - user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + user: components["schemas"]["simple-user"] | null; labels: components["schemas"]["label"][]; - assignee: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + assignee: components["schemas"]["simple-user"] | null; assignees?: components["schemas"]["simple-user"][] | null; - milestone: (components["schemas"]["milestone"] & { [key: string]: any }) | null; + milestone: components["schemas"]["milestone"] | null; locked: boolean; active_lock_reason?: string | null; comments: number; @@ -5901,7 +5893,7 @@ export interface components { html_url: string | null; patch_url: string | null; url: string | null; - } & { [key: string]: any }; + }; closed_at: string | null; created_at: string; updated_at: string; @@ -5910,8 +5902,8 @@ export interface components { body_text?: string; timeline_url?: string; repository?: components["schemas"]["repository"]; - performed_via_github_app?: (components["schemas"]["integration"] & { [key: string]: any }) | null; - } & { [key: string]: any }; + performed_via_github_app?: components["schemas"]["integration"] | null; + }; "reaction-rollup": { url: string; total_count: number; @@ -5923,7 +5915,7 @@ export interface components { hooray: number; eyes: number; rocket: number; - } & { [key: string]: any }; + }; /** Comments provide a way for people to collaborate on an issue. */ "issue-comment": { /** Unique identifier of the issue comment */ @@ -5936,14 +5928,14 @@ export interface components { body_text?: string; body_html?: string; html_url: string; - user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + user: components["schemas"]["simple-user"] | null; created_at: string; updated_at: string; issue_url: string; author_association: components["schemas"]["author_association"]; - performed_via_github_app?: (components["schemas"]["integration"] & { [key: string]: any }) | null; + performed_via_github_app?: components["schemas"]["integration"] | null; reactions?: components["schemas"]["reaction-rollup"]; - } & { [key: string]: any }; + }; /** Event */ event: { id: string; @@ -5953,29 +5945,29 @@ export interface components { id: number; name: string; url: string; - } & { [key: string]: any }; + }; org?: components["schemas"]["actor"]; payload: { action: string; issue?: components["schemas"]["issue-simple"]; comment?: components["schemas"]["issue-comment"]; - pages?: ({ + pages?: { page_name?: string; title?: string; summary?: string | null; action?: string; sha?: string; html_url?: string; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; public: boolean; created_at: string | null; - } & { [key: string]: any }; + }; /** Hypermedia Link with Type */ "link-with-type": { href: string; type: string; - } & { [key: string]: any }; + }; /** Feed */ feed: { timeline_url: string; @@ -5995,8 +5987,8 @@ export interface components { current_user_actor?: components["schemas"]["link-with-type"]; current_user_organization?: components["schemas"]["link-with-type"]; current_user_organizations?: components["schemas"]["link-with-type"][]; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** Base Gist */ "base-gist": { url: string; @@ -6014,20 +6006,20 @@ export interface components { language?: string; raw_url?: string; size?: number; - } & { [key: string]: any }; + }; }; public: boolean; created_at: string; updated_at: string; description: string | null; comments: number; - user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + user: components["schemas"]["simple-user"] | null; comments_url: string; - owner?: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + owner?: components["schemas"]["simple-user"] | null; truncated?: boolean; forks?: { [key: string]: any }[]; history?: { [key: string]: any }[]; - } & { [key: string]: any }; + }; /** Gist Simple */ "gist-simple": { url?: string; @@ -6039,17 +6031,15 @@ export interface components { git_push_url?: string; html_url?: string; files?: { - [key: string]: - | ({ - filename?: string; - type?: string; - language?: string; - raw_url?: string; - size?: number; - truncated?: boolean; - content?: string; - } & { [key: string]: any }) - | null; + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + truncated?: boolean; + content?: string; + } | null; }; public?: boolean; created_at?: string; @@ -6060,7 +6050,7 @@ export interface components { comments_url?: string; owner?: components["schemas"]["simple-user"]; truncated?: boolean; - } & { [key: string]: any }; + }; /** A comment made to a gist. */ "gist-comment": { id: number; @@ -6068,28 +6058,28 @@ export interface components { url: string; /** The comment text. */ body: string; - user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + user: components["schemas"]["simple-user"] | null; created_at: string; updated_at: string; author_association: components["schemas"]["author_association"]; - } & { [key: string]: any }; + }; /** Gist Commit */ "gist-commit": { url: string; version: string; - user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + user: components["schemas"]["simple-user"] | null; change_status: { total?: number; additions?: number; deletions?: number; - } & { [key: string]: any }; + }; committed_at: string; - } & { [key: string]: any }; + }; /** Gitignore Template */ "gitignore-template": { name: string; source: string; - } & { [key: string]: any }; + }; /** Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. */ issue: { id: number; @@ -6109,11 +6099,11 @@ export interface components { title: string; /** Contents of the issue */ body?: string; - user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + user: components["schemas"]["simple-user"] | null; /** 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 */ - labels: (( + labels: ( | string - | ({ + | { id?: number; node_id?: string; url?: string; @@ -6121,11 +6111,11 @@ export interface components { description?: string | null; color?: string | null; default?: boolean; - } & { [key: string]: any }) - ) & { [key: string]: any })[]; - assignee: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + } + )[]; + assignee: components["schemas"]["simple-user"] | null; assignees?: components["schemas"]["simple-user"][] | null; - milestone: (components["schemas"]["milestone"] & { [key: string]: any }) | null; + milestone: components["schemas"]["milestone"] | null; locked: boolean; active_lock_reason?: string | null; comments: number; @@ -6135,19 +6125,19 @@ export interface components { html_url: string | null; patch_url: string | null; url: string | null; - } & { [key: string]: any }; + }; closed_at: string | null; created_at: string; updated_at: string; - closed_by?: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + closed_by?: components["schemas"]["simple-user"] | null; body_html?: string; body_text?: string; timeline_url?: string; repository?: components["schemas"]["repository"]; - performed_via_github_app?: (components["schemas"]["integration"] & { [key: string]: any }) | null; + performed_via_github_app?: components["schemas"]["integration"] | null; author_association: components["schemas"]["author_association"]; reactions?: components["schemas"]["reaction-rollup"]; - } & { [key: string]: any }; + }; /** License */ license: { key: string; @@ -6163,7 +6153,7 @@ export interface components { limitations: string[]; body: string; featured: boolean; - } & { [key: string]: any }; + }; /** Marketplace Listing Plan */ "marketplace-listing-plan": { url: string; @@ -6179,7 +6169,7 @@ export interface components { unit_name: string | null; state: string; bullets: string[]; - } & { [key: string]: any }; + }; /** Marketplace Purchase */ "marketplace-purchase": { url: string; @@ -6187,15 +6177,13 @@ export interface components { id: number; login: string; organization_billing_email?: string; - marketplace_pending_change?: - | ({ - is_installed?: boolean; - effective_date?: string; - unit_count?: number | null; - id?: number; - plan?: components["schemas"]["marketplace-listing-plan"]; - } & { [key: string]: any }) - | null; + marketplace_pending_change?: { + is_installed?: boolean; + effective_date?: string; + unit_count?: number | null; + id?: number; + plan?: components["schemas"]["marketplace-listing-plan"]; + } | null; marketplace_purchase: { billing_cycle?: string; next_billing_date?: string | null; @@ -6205,15 +6193,15 @@ export interface components { free_trial_ends_on?: string | null; updated_at?: string; plan?: components["schemas"]["marketplace-listing-plan"]; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** Api Overview */ "api-overview": { verifiable_password_authentication: boolean; ssh_key_fingerprints?: { SHA256_RSA?: string; SHA256_DSA?: string; - } & { [key: string]: any }; + }; hooks?: string[]; web?: string[]; api?: string[]; @@ -6221,14 +6209,14 @@ export interface components { pages?: string[]; importer?: string[]; actions?: string[]; - } & { [key: string]: any }; + }; /** Minimal Repository */ "minimal-repository": { id: number; node_id: string; name: string; full_name: string; - owner: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + owner: components["schemas"]["simple-user"] | null; private: boolean; html_url: string; description: string | null; @@ -6300,25 +6288,23 @@ export interface components { admin?: boolean; push?: boolean; pull?: boolean; - } & { [key: string]: any }; - template_repository?: (components["schemas"]["repository"] & { [key: string]: any }) | null; + }; + template_repository?: components["schemas"]["repository"] | null; temp_clone_token?: string; delete_branch_on_merge?: boolean; subscribers_count?: number; network_count?: number; - license?: - | ({ - key?: string; - name?: string; - spdx_id?: string; - url?: string; - node_id?: string; - } & { [key: string]: any }) - | null; + license?: { + key?: string; + name?: string; + spdx_id?: string; + url?: string; + node_id?: string; + } | null; forks?: number; open_issues?: number; watchers?: number; - } & { [key: string]: any }; + }; /** Thread */ thread: { id: string; @@ -6328,14 +6314,14 @@ export interface components { url: string; latest_comment_url: string; type: string; - } & { [key: string]: any }; + }; reason: string; unread: boolean; updated_at: string; last_read_at: string | null; url: string; subscription_url: string; - } & { [key: string]: any }; + }; /** Thread Subscription */ "thread-subscription": { subscribed: boolean; @@ -6345,7 +6331,7 @@ export interface components { url: string; thread_url?: string; repository_url?: string; - } & { [key: string]: any }; + }; /** Organization Full */ "organization-full": { login: string; @@ -6388,7 +6374,7 @@ export interface components { private_repos: number; filled_seats?: number; seats?: number; - } & { [key: string]: any }; + }; default_repository_permission?: string | null; members_can_create_repositories?: boolean | null; two_factor_requirement_enabled?: boolean | null; @@ -6398,7 +6384,7 @@ export interface components { members_can_create_internal_repositories?: boolean; members_can_create_pages?: boolean; updated_at: string; - } & { [key: string]: any }; + }; /** The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. */ "enabled-repositories": "all" | "none" | "selected"; "actions-organization-permissions": { @@ -6407,7 +6393,7 @@ export interface components { selected_repositories_url?: string; allowed_actions: components["schemas"]["allowed-actions"]; selected_actions_url?: components["schemas"]["selected-actions-url"]; - } & { [key: string]: any }; + }; "runner-groups-org": { id: number; name: string; @@ -6419,7 +6405,7 @@ export interface components { inherited: boolean; inherited_allows_public_repositories?: boolean; allows_public_repositories: boolean; - } & { [key: string]: any }; + }; /** Secrets for GitHub Actions for an organization. */ "organization-actions-secret": { /** The name of the secret. */ @@ -6429,7 +6415,7 @@ export interface components { /** Visibility of a secret */ visibility: "all" | "private" | "selected"; selected_repositories_url?: string; - } & { [key: string]: any }; + }; /** The public key used for setting Actions Secrets. */ "actions-public-key": { /** The identifier for the key. */ @@ -6440,7 +6426,7 @@ export interface components { url?: string; title?: string; created_at?: string; - } & { [key: string]: any }; + }; /** Credential Authorization */ "credential-authorization": { /** User login that owns the underlying credential. */ @@ -6464,7 +6450,7 @@ export interface components { authorized_credential_title?: string | null; /** The note given to the token. This will only be present when the credential is a token. */ authorized_credential_note?: string | null; - } & { [key: string]: any }; + }; /** Organization Invitation */ "organization-invitation": { id: number; @@ -6479,7 +6465,7 @@ export interface components { invitation_team_url: string; node_id: string; invitation_teams_url?: string; - } & { [key: string]: any }; + }; /** Org Hook */ "org-hook": { id: number; @@ -6493,11 +6479,11 @@ export interface components { insecure_ssl?: string; content_type?: string; secret?: string; - } & { [key: string]: any }; + }; updated_at: string; created_at: string; type: string; - } & { [key: string]: any }; + }; /** 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`. */ "interaction-group": "existing_users" | "contributors_only" | "collaborators_only"; /** Interaction limit settings. */ @@ -6505,38 +6491,36 @@ export interface components { limit: components["schemas"]["interaction-group"]; origin: string; expires_at: string; - } & { [key: string]: any }; + }; /** The duration of the interaction restriction. Can be one of: `one_day`, `three_days`, `one_week`, `one_month`, `six_months`. Default: `one_day`. */ "interaction-expiry": "one_day" | "three_days" | "one_week" | "one_month" | "six_months"; /** Limit interactions to a specific type of user for a specified duration */ "interaction-limit": { limit: components["schemas"]["interaction-group"]; expiry?: components["schemas"]["interaction-expiry"]; - } & { [key: string]: any }; + }; /** Groups of organization members that gives permissions on specified repositories. */ - "team-simple": - | ({ - /** Unique identifier of the team */ - id: number; - node_id: string; - /** URL for the team */ - url: string; - members_url: string; - /** Name of the team */ - name: string; - /** Description of the team */ - description: string | null; - /** Permission that the team will have for its repositories */ - permission: string; - /** The level of privacy this team should have */ - privacy?: string; - html_url: string; - repositories_url: string; - slug: string; - /** Distinguished Name (DN) that team maps to within LDAP environment */ - ldap_dn?: string; - } & { [key: string]: any }) - | null; + "team-simple": { + /** Unique identifier of the team */ + id: number; + node_id: string; + /** URL for the team */ + url: string; + members_url: string; + /** Name of the team */ + name: string; + /** Description of the team */ + description: string | null; + /** Permission that the team will have for its repositories */ + permission: string; + /** The level of privacy this team should have */ + privacy?: string; + html_url: string; + repositories_url: string; + slug: string; + /** Distinguished Name (DN) that team maps to within LDAP environment */ + ldap_dn?: string; + } | null; /** Groups of organization members that gives permissions on specified repositories. */ team: { id: number; @@ -6550,8 +6534,8 @@ export interface components { html_url: string; members_url: string; repositories_url: string; - parent?: (components["schemas"]["team-simple"] & { [key: string]: any }) | null; - } & { [key: string]: any }; + parent?: components["schemas"]["team-simple"] | null; + }; /** Org Membership */ "org-membership": { url: string; @@ -6559,15 +6543,15 @@ export interface components { role: string; organization_url: string; organization: components["schemas"]["organization-simple"]; - user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + user: components["schemas"]["simple-user"] | null; permissions?: { can_create_repository: boolean; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** A migration. */ migration: { id: number; - owner: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + owner: components["schemas"]["simple-user"] | null; guid: string; state: string; lock_repositories: boolean; @@ -6579,7 +6563,7 @@ export interface components { node_id: string; archive_url?: string; exclude?: { [key: string]: any }[]; - } & { [key: string]: any }; + }; /** A software package */ package: { /** Unique identifier of the package. */ @@ -6592,11 +6576,11 @@ export interface components { /** The number of versions of the package. */ version_count: number; visibility: "private" | "public"; - owner?: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; - repository?: (components["schemas"]["minimal-repository"] & { [key: string]: any }) | null; + owner?: components["schemas"]["simple-user"] | null; + repository?: components["schemas"]["minimal-repository"] | null; created_at: string; updated_at: string; - } & { [key: string]: any }; + }; /** A version of a software package */ "package-version": { /** Unique identifier of the package version. */ @@ -6615,12 +6599,12 @@ export interface components { package_type: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container"; container?: { tags: any[]; - } & { [key: string]: any }; + }; docker?: { tag?: any[]; - } & { [key: string]: any }; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; + }; /** Projects are a way to organize columns and cards of work. */ project: { owner_url: string; @@ -6636,18 +6620,18 @@ export interface components { number: number; /** State of the project; either 'open' or 'closed' */ state: string; - creator: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + creator: components["schemas"]["simple-user"] | null; created_at: string; updated_at: string; /** The baseline permission that all organization members have on this project. Only present if owner is an organization. */ organization_permission?: "read" | "write" | "admin" | "none"; /** Whether or not this project can be seen by everyone. Only present if owner is an organization. */ private?: boolean; - } & { [key: string]: any }; + }; /** External Groups to be mapped to a team for membership */ "group-mapping": { /** Array of groups to be mapped to this team */ - groups?: ({ + groups?: { /** The ID of the group */ group_id: string; /** The name of the group */ @@ -6658,8 +6642,8 @@ export interface components { status?: string; /** the time of the last sync for this group-mapping */ synced_at?: string; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; /** Groups of organization members that gives permissions on specified repositories. */ "team-full": { /** Unique identifier of the team */ @@ -6678,7 +6662,7 @@ export interface components { permission: string; members_url: string; repositories_url: string; - parent?: (components["schemas"]["team-simple"] & { [key: string]: any }) | null; + parent?: components["schemas"]["team-simple"] | null; members_count: number; repos_count: number; created_at: string; @@ -6686,10 +6670,10 @@ export interface components { organization: components["schemas"]["organization-full"]; /** Distinguished Name (DN) that team maps to within LDAP environment */ ldap_dn?: string; - } & { [key: string]: any }; + }; /** A team discussion is a persistent record of a free-form conversation within a team. */ "team-discussion": { - author: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + author: components["schemas"]["simple-user"] | null; /** The main text of the discussion. */ body: string; body_html: string; @@ -6713,10 +6697,10 @@ export interface components { updated_at: string; url: string; reactions?: components["schemas"]["reaction-rollup"]; - } & { [key: string]: any }; + }; /** A reply to a discussion within a team. */ "team-discussion-comment": { - author: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + author: components["schemas"]["simple-user"] | null; /** The main text of the comment. */ body: string; body_html: string; @@ -6732,23 +6716,23 @@ export interface components { updated_at: string; url: string; reactions?: components["schemas"]["reaction-rollup"]; - } & { [key: string]: any }; + }; /** Reactions to conversations provide a way to help people express their feelings more simply and effectively. */ reaction: { id: number; node_id: string; - user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + user: components["schemas"]["simple-user"] | null; /** The reaction to use */ content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; created_at: string; - } & { [key: string]: any }; + }; /** Team Membership */ "team-membership": { url: string; /** The role of the user in the team. */ role: "member" | "maintainer"; state: string; - } & { [key: string]: any }; + }; /** A team's access to a project. */ "team-project": { owner_url: string; @@ -6772,8 +6756,8 @@ export interface components { read: boolean; write: boolean; admin: boolean; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** A team's access to a repository. */ "team-repository": { /** Unique identifier of the repository */ @@ -6782,7 +6766,7 @@ export interface components { /** The name of the repository. */ name: string; full_name: string; - license: (components["schemas"]["license-simple"] & { [key: string]: any }) | null; + license: components["schemas"]["license-simple"] | null; forks: number; permissions?: { admin: boolean; @@ -6790,8 +6774,8 @@ export interface components { triage?: boolean; push: boolean; maintain?: boolean; - } & { [key: string]: any }; - owner: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + }; + owner: components["schemas"]["simple-user"] | null; /** Whether the repository is private or public. */ private: boolean; html_url: string; @@ -6871,7 +6855,7 @@ export interface components { updated_at: string | null; /** Whether to allow rebase merges for pull requests. */ allow_rebase_merge?: boolean; - template_repository?: (components["schemas"]["repository"] & { [key: string]: any }) | null; + template_repository?: components["schemas"]["repository"] | null; temp_clone_token?: string; /** Whether to allow squash merges for pull requests. */ allow_squash_merge?: boolean; @@ -6884,7 +6868,7 @@ export interface components { open_issues: number; watchers: number; master_branch?: string; - } & { [key: string]: any }; + }; /** Project cards represent a scope of work. */ "project-card": { url: string; @@ -6892,7 +6876,7 @@ export interface components { id: number; node_id: string; note: string | null; - creator: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + creator: components["schemas"]["simple-user"] | null; created_at: string; updated_at: string; /** Whether or not the card is archived */ @@ -6900,7 +6884,7 @@ export interface components { column_url: string; content_url?: string; project_url: string; - } & { [key: string]: any }; + }; /** Project columns contain cards of work. */ "project-column": { url: string; @@ -6913,17 +6897,17 @@ export interface components { name: string; created_at: string; updated_at: string; - } & { [key: string]: any }; + }; /** Repository Collaborator Permission */ "repository-collaborator-permission": { permission: string; - user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; - } & { [key: string]: any }; + user: components["schemas"]["simple-user"] | null; + }; "rate-limit": { limit: number; remaining: number; reset: number; - } & { [key: string]: any }; + }; /** Rate Limit Overview */ "rate-limit-overview": { resources: { @@ -6933,23 +6917,23 @@ export interface components { source_import?: components["schemas"]["rate-limit"]; integration_manifest?: components["schemas"]["rate-limit"]; code_scanning_upload?: components["schemas"]["rate-limit"]; - } & { [key: string]: any }; + }; rate: components["schemas"]["rate-limit"]; - } & { [key: string]: any }; + }; /** Code of Conduct Simple */ "code-of-conduct-simple": { url: string; key: string; name: string; html_url: string | null; - } & { [key: string]: any }; + }; /** Full Repository */ "full-repository": { id: number; node_id: string; name: string; full_name: string; - owner: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + owner: components["schemas"]["simple-user"] | null; private: boolean; html_url: string; description: string | null; @@ -7023,17 +7007,17 @@ export interface components { admin: boolean; pull: boolean; push: boolean; - } & { [key: string]: any }; + }; allow_rebase_merge?: boolean; - template_repository?: (components["schemas"]["repository"] & { [key: string]: any }) | null; + template_repository?: components["schemas"]["repository"] | null; temp_clone_token?: string | null; allow_squash_merge?: boolean; delete_branch_on_merge?: boolean; allow_merge_commit?: boolean; subscribers_count: number; network_count: number; - license: (components["schemas"]["license-simple"] & { [key: string]: any }) | null; - organization?: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + license: components["schemas"]["license-simple"] | null; + organization?: components["schemas"]["simple-user"] | null; parent?: components["schemas"]["repository"]; source?: components["schemas"]["repository"]; forks: number; @@ -7043,7 +7027,7 @@ export interface components { /** Whether anonymous git access is allowed. */ anonymous_access_enabled?: boolean; code_of_conduct?: components["schemas"]["code-of-conduct-simple"]; - } & { [key: string]: any }; + }; /** An artifact */ artifact: { id: number; @@ -7059,7 +7043,7 @@ export interface components { created_at: string | null; expires_at: string; updated_at: string | null; - } & { [key: string]: any }; + }; /** Information of a job execution in a workflow run */ job: { /** The id of the job. */ @@ -7083,7 +7067,7 @@ export interface components { /** The name of the job. */ name: string; /** Steps in this job. */ - steps?: ({ + steps?: { /** The phase of the lifecycle that the job is currently in. */ status: "queued" | "in_progress" | "completed"; /** The outcome of the job. */ @@ -7095,16 +7079,16 @@ export interface components { started_at?: string | null; /** The time that the job finished, in ISO 8601 format. */ completed_at?: string | null; - } & { [key: string]: any })[]; + }[]; check_run_url: string; - } & { [key: string]: any }; + }; /** Whether GitHub Actions is enabled on the repository. */ "actions-enabled": boolean; "actions-repository-permissions": { enabled: components["schemas"]["actions-enabled"]; allowed_actions: components["schemas"]["allowed-actions"]; selected_actions_url?: components["schemas"]["selected-actions-url"]; - } & { [key: string]: any }; + }; "pull-request-minimal": { id: number; number: number; @@ -7116,8 +7100,8 @@ export interface components { id: number; url: string; name: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; base: { ref: string; sha: string; @@ -7125,28 +7109,24 @@ export interface components { id: number; url: string; name: string; - } & { [key: string]: any }; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; + }; /** Simple Commit */ "simple-commit": { id: string; tree_id: string; message: string; timestamp: string; - author: - | ({ - name: string; - email: string; - } & { [key: string]: any }) - | null; - committer: - | ({ - name: string; - email: string; - } & { [key: string]: any }) - | null; - } & { [key: string]: any }; + author: { + name: string; + email: string; + } | null; + committer: { + name: string; + email: string; + } | null; + }; /** An invocation of a workflow */ "workflow-run": { /** The ID of the workflow run. */ @@ -7188,11 +7168,11 @@ export interface components { repository: components["schemas"]["minimal-repository"]; head_repository: components["schemas"]["minimal-repository"]; head_repository_id?: number; - } & { [key: string]: any }; + }; /** An entry in the reviews log for environment deployments */ "environment-approvals": { /** The list of environments that were approved or rejected */ - environments: ({ + environments: { /** The id of the environment. */ id?: number; node_id?: string; @@ -7204,13 +7184,13 @@ export interface components { created_at?: string; /** The time that the environment was last updated, in ISO 8601 format. */ updated_at?: string; - } & { [key: string]: any })[]; + }[]; /** Whether deployment to the environment(s) was approved or rejected */ state: "approved" | "rejected"; user: components["schemas"]["simple-user"]; /** The comment submitted with the deployment review */ comment: string; - } & { [key: string]: any }; + }; /** The type of reviewer. Must be one of: `User` or `Team` */ "deployment-reviewer-type": "User" | "Team"; /** Details of a deployment that is waiting for protection rules to pass */ @@ -7223,7 +7203,7 @@ export interface components { name?: string; url?: string; html_url?: string; - } & { [key: string]: any }; + }; /** The set duration of the wait timer */ wait_timer: number; /** The time that the wait timer began. */ @@ -7231,13 +7211,11 @@ export interface components { /** Whether the currently authenticated user can approve the deployment */ current_user_can_approve: boolean; /** 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: ({ + reviewers: { type?: components["schemas"]["deployment-reviewer-type"]; - reviewer?: (Partial & Partial) & { - [key: string]: any; - }; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + reviewer?: Partial & Partial; + }[]; + }; /** A request for a specific ref(branch,sha,tag) to be deployed */ deployment: { url: string; @@ -7254,7 +7232,7 @@ export interface components { /** Name for the target deployment environment. */ environment: string; description: string | null; - creator: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + creator: components["schemas"]["simple-user"] | null; created_at: string; updated_at: string; statuses_url: string; @@ -7263,33 +7241,33 @@ export interface components { transient_environment?: boolean; /** Specifies if the given environment is one that end-users directly interact with. Default: false. */ production_environment?: boolean; - performed_via_github_app?: (components["schemas"]["integration"] & { [key: string]: any }) | null; - } & { [key: string]: any }; + performed_via_github_app?: components["schemas"]["integration"] | null; + }; /** Workflow Run Usage */ "workflow-run-usage": { billable: { UBUNTU?: { total_ms: number; jobs: number; - } & { [key: string]: any }; + }; MACOS?: { total_ms: number; jobs: number; - } & { [key: string]: any }; + }; WINDOWS?: { total_ms: number; jobs: number; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; run_duration_ms: number; - } & { [key: string]: any }; + }; /** Set secrets for GitHub Actions. */ "actions-secret": { /** The name of the secret. */ name: string; created_at: string; updated_at: string; - } & { [key: string]: any }; + }; /** A GitHub Actions workflow */ workflow: { id: number; @@ -7303,26 +7281,26 @@ export interface components { html_url: string; badge_url: string; deleted_at?: string; - } & { [key: string]: any }; + }; /** Workflow Usage */ "workflow-usage": { billable: { UBUNTU?: { total_ms?: number; - } & { [key: string]: any }; + }; MACOS?: { total_ms?: number; - } & { [key: string]: any }; + }; WINDOWS?: { total_ms?: number; - } & { [key: string]: any }; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; + }; /** Protected Branch Admin Enforced */ "protected-branch-admin-enforced": { url: string; enabled: boolean; - } & { [key: string]: any }; + }; /** Protected Branch Pull Request Review */ "protected-branch-pull-request-review": { url?: string; @@ -7334,18 +7312,18 @@ export interface components { url?: string; users_url?: string; teams_url?: string; - } & { [key: string]: any }; + }; dismiss_stale_reviews: boolean; require_code_owner_reviews: boolean; required_approving_review_count?: number; - } & { [key: string]: any }; + }; /** Branch Restriction Policy */ "branch-restriction-policy": { url: string; users_url: string; teams_url: string; apps_url: string; - users: ({ + users: { login?: string; id?: number; node_id?: string; @@ -7364,8 +7342,8 @@ export interface components { received_events_url?: string; type?: string; site_admin?: boolean; - } & { [key: string]: any })[]; - teams: ({ + }[]; + teams: { id?: number; node_id?: string; url?: string; @@ -7378,8 +7356,8 @@ export interface components { members_url?: string; repositories_url?: string; parent?: string | null; - } & { [key: string]: any })[]; - apps: ({ + }[]; + apps: { id?: number; slug?: string; node_id?: string; @@ -7406,7 +7384,7 @@ export interface components { organizations_url?: string; received_events_url?: string; type?: string; - } & { [key: string]: any }; + }; name?: string; description?: string; external_url?: string; @@ -7418,10 +7396,10 @@ export interface components { contents?: string; issues?: string; single_file?: string; - } & { [key: string]: any }; + }; events?: string[]; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; /** Branch Protection */ "branch-protection": { url?: string; @@ -7430,46 +7408,46 @@ export interface components { enforcement_level: string; contexts: string[]; contexts_url?: string; - } & { [key: string]: any }; + }; enforce_admins?: components["schemas"]["protected-branch-admin-enforced"]; required_pull_request_reviews?: components["schemas"]["protected-branch-pull-request-review"]; restrictions?: components["schemas"]["branch-restriction-policy"]; required_linear_history?: { enabled?: boolean; - } & { [key: string]: any }; + }; allow_force_pushes?: { enabled?: boolean; - } & { [key: string]: any }; + }; allow_deletions?: { enabled?: boolean; - } & { [key: string]: any }; + }; enabled: boolean; name?: string; protection_url?: string; - } & { [key: string]: any }; + }; /** Short Branch */ "short-branch": { name: string; commit: { sha: string; url: string; - } & { [key: string]: any }; + }; protected: boolean; protection?: components["schemas"]["branch-protection"]; protection_url?: string; - } & { [key: string]: any }; + }; /** Metaproperties for Git author/committer information. */ "git-user": { name?: string; email?: string; date?: string; - } & { [key: string]: any }; + }; verification: { verified: boolean; reason: string; payload: string | null; signature: string | null; - } & { [key: string]: any }; + }; /** Commit */ commit: { url: string; @@ -7479,29 +7457,29 @@ export interface components { comments_url: string; commit: { url: string; - author: (components["schemas"]["git-user"] & { [key: string]: any }) | null; - committer: (components["schemas"]["git-user"] & { [key: string]: any }) | null; + author: components["schemas"]["git-user"] | null; + committer: components["schemas"]["git-user"] | null; message: string; comment_count: number; tree: { sha: string; url: string; - } & { [key: string]: any }; + }; verification?: components["schemas"]["verification"]; - } & { [key: string]: any }; - author: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; - committer: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; - parents: ({ + }; + author: components["schemas"]["simple-user"] | null; + committer: components["schemas"]["simple-user"] | null; + parents: { sha: string; url: string; html_url?: string; - } & { [key: string]: any })[]; + }[]; stats?: { additions?: number; deletions?: number; total?: number; - } & { [key: string]: any }; - files?: ({ + }; + files?: { filename?: string; additions?: number; deletions?: number; @@ -7513,8 +7491,8 @@ export interface components { sha?: string; contents_url?: string; previous_filename?: string; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; /** Branch With Protection */ "branch-with-protection": { name: string; @@ -7522,20 +7500,20 @@ export interface components { _links: { html: string; self: string; - } & { [key: string]: any }; + }; protected: boolean; protection: components["schemas"]["branch-protection"]; protection_url: string; pattern?: string; required_approving_review_count?: number; - } & { [key: string]: any }; + }; /** Status Check Policy */ "status-check-policy": { url: string; strict: boolean; contexts: string[]; contexts_url: string; - } & { [key: string]: any }; + }; /** Branch protections protect branches */ "protected-branch": { url: string; @@ -7551,12 +7529,12 @@ export interface components { teams_url: string; users: components["schemas"]["simple-user"][]; teams: components["schemas"]["team"][]; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; required_signatures?: { url: string; enabled: boolean; - } & { [key: string]: any }; + }; enforce_admins?: { url: string; enabled: boolean; @@ -7571,7 +7549,7 @@ export interface components { enabled: boolean; }; restrictions?: components["schemas"]["branch-restriction-policy"]; - } & { [key: string]: any }; + }; /** A deployment created as the result of an Actions check run from a workflow that references an environment */ "deployment-simple": { url: string; @@ -7592,8 +7570,8 @@ export interface components { transient_environment?: boolean; /** Specifies if the given environment is one that end-users directly interact with. Default: false. */ production_environment?: boolean; - performed_via_github_app?: (components["schemas"]["integration"] & { [key: string]: any }) | null; - } & { [key: string]: any }; + performed_via_github_app?: components["schemas"]["integration"] | null; + }; /** A check performed on the code of a given code change */ "check-run": { /** The id of the check. */ @@ -7618,18 +7596,16 @@ export interface components { text: string | null; annotations_count: number; annotations_url: string; - } & { [key: string]: any }; + }; /** The name of the check. */ name: string; - check_suite: - | ({ - id: number; - } & { [key: string]: any }) - | null; - app: (components["schemas"]["integration"] & { [key: string]: any }) | null; + check_suite: { + id: number; + } | null; + app: components["schemas"]["integration"] | null; pull_requests: components["schemas"]["pull-request-minimal"][]; deployment?: components["schemas"]["deployment-simple"]; - } & { [key: string]: any }; + }; /** Check Annotation */ "check-annotation": { path: string; @@ -7642,7 +7618,7 @@ export interface components { message: string | null; raw_details: string | null; blob_href: string; - } & { [key: string]: any }; + }; /** A suite of checks performed on the code of a given code change */ "check-suite": { id: number; @@ -7658,24 +7634,24 @@ export interface components { before: string | null; after: string | null; pull_requests: components["schemas"]["pull-request-minimal"][] | null; - app: (components["schemas"]["integration"] & { [key: string]: any }) | null; + app: components["schemas"]["integration"] | null; repository: components["schemas"]["minimal-repository"]; created_at: string | null; updated_at: string | null; head_commit: components["schemas"]["simple-commit"]; latest_check_runs_count: number; check_runs_url: string; - } & { [key: string]: any }; + }; /** Check suite configuration preferences for a repository. */ "check-suite-preference": { preferences: { - auto_trigger_checks?: ({ + auto_trigger_checks?: { app_id: number; setting: boolean; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; repository: components["schemas"]["repository"]; - } & { [key: string]: any }; + }; /** The name of the tool used to generate the code scanning analysis. */ "code-scanning-analysis-tool-name": string; /** The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ @@ -7707,14 +7683,14 @@ export interface components { severity?: ("none" | "note" | "warning" | "error") | null; /** A short description of the rule used to detect the alert. */ description?: string; - } & { [key: string]: any }; + }; /** The version of the tool used to generate the code scanning analysis. */ "code-scanning-analysis-tool-version": string | null; "code-scanning-analysis-tool": { name?: components["schemas"]["code-scanning-analysis-tool-name"]; version?: components["schemas"]["code-scanning-analysis-tool-version"]; guid?: components["schemas"]["code-scanning-analysis-tool-guid"]; - } & { [key: string]: any }; + }; /** 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; /** 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. */ @@ -7726,7 +7702,7 @@ export interface components { end_line?: number; start_column?: number; end_column?: number; - } & { [key: string]: any }; + }; /** A classification of the file. For example to identify it as generated. */ "code-scanning-alert-classification": ("source" | "generated" | "test" | "library") | null; "code-scanning-alert-instance": { @@ -7737,7 +7713,7 @@ export interface components { commit_sha?: string; message?: { text?: string; - } & { [key: string]: any }; + }; location?: components["schemas"]["code-scanning-alert-location"]; html_url?: string; /** @@ -7745,7 +7721,7 @@ export interface components { * For example identifying it as documentation, or a generated file. */ classifications?: components["schemas"]["code-scanning-alert-classification"][]; - } & { [key: string]: any }; + }; "code-scanning-alert-items": { number: components["schemas"]["alert-number"]; created_at: components["schemas"]["alert-created-at"]; @@ -7759,7 +7735,7 @@ export interface components { rule: components["schemas"]["code-scanning-alert-rule-summary"]; tool: components["schemas"]["code-scanning-analysis-tool"]; most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; - } & { [key: string]: any }; + }; "code-scanning-alert-rule": { /** A unique identifier for the rule used to detect the alert. */ id?: string | null; @@ -7775,7 +7751,7 @@ export interface components { tags?: string[]; /** Detailed documentation for the rule as GitHub Flavored Markdown. */ help?: string; - } & { [key: string]: any }; + }; "code-scanning-alert": { number: components["schemas"]["alert-number"]; created_at: components["schemas"]["alert-created-at"]; @@ -7789,7 +7765,7 @@ export interface components { rule: components["schemas"]["code-scanning-alert-rule"]; tool: components["schemas"]["code-scanning-analysis-tool"]; most_recent_instance: components["schemas"]["code-scanning-alert-instance"]; - } & { [key: string]: any }; + }; /** 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`. */ "code-scanning-alert-set-state": "open" | "dismissed"; /** An identifier for the upload. */ @@ -7819,14 +7795,14 @@ export interface components { sarif_id: components["schemas"]["code-scanning-analysis-sarif-id"]; tool: components["schemas"]["code-scanning-analysis-tool"]; deletable: boolean; - } & { [key: string]: any }; + }; /** Successful deletion of a code scanning analysis */ "code-scanning-analysis-deletion": { /** Next deletable analysis in chain, without last analysis deletion confirmation */ next_analysis_url: string | null; /** Next deletable analysis in chain, with last analysis deletion confirmation */ confirm_delete_url: string | null; - } & { [key: string]: any }; + }; /** Scim Error */ "scim-error": { message?: string | null; @@ -7835,20 +7811,20 @@ export interface components { status?: number; scimType?: string | null; schemas?: string[]; - } & { [key: string]: any }; + }; /** 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/github/finding-security-vulnerabilities-and-errors-in-your-code/sarif-support-for-code-scanning)." */ "code-scanning-analysis-sarif-file": string; "code-scanning-sarifs-receipt": { id?: components["schemas"]["code-scanning-analysis-sarif-id"]; /** The REST API URL for checking the status of the upload. */ url?: string; - } & { [key: string]: any }; + }; "code-scanning-sarifs-status": { /** `pending` files have not yet been processed, while `complete` means all results in the SARIF have been stored. */ processing_status?: "pending" | "complete"; /** The REST API URL for getting the analyses associated with the upload. */ analyses_url?: string | null; - } & { [key: string]: any }; + }; /** Collaborator */ collaborator: { login: string; @@ -7873,15 +7849,15 @@ export interface components { pull: boolean; push: boolean; admin: boolean; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** Repository invitations let you manage who you collaborate with. */ "repository-invitation": { /** Unique identifier of the repository invitation. */ id: number; repository: components["schemas"]["minimal-repository"]; - invitee: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; - inviter: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + invitee: components["schemas"]["simple-user"] | null; + inviter: components["schemas"]["simple-user"] | null; /** The permission associated with the invitation. */ permissions: "read" | "write" | "admin"; created_at: string; @@ -7891,7 +7867,7 @@ export interface components { url: string; html_url: string; node_id: string; - } & { [key: string]: any }; + }; /** Commit Comment */ "commit-comment": { html_url: string; @@ -7903,37 +7879,35 @@ export interface components { position: number | null; line: number | null; commit_id: string; - user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + user: components["schemas"]["simple-user"] | null; created_at: string; updated_at: string; author_association: components["schemas"]["author_association"]; reactions?: components["schemas"]["reaction-rollup"]; - } & { [key: string]: any }; + }; /** Branch Short */ "branch-short": { name: string; commit: { sha: string; url: string; - } & { [key: string]: any }; + }; protected: boolean; - } & { [key: string]: any }; + }; /** Hypermedia Link */ link: { href: string; - } & { [key: string]: any }; + }; /** The status of auto merging a pull request. */ - auto_merge: - | ({ - enabled_by: components["schemas"]["simple-user"]; - /** The merge method to use. */ - merge_method: "merge" | "squash" | "rebase"; - /** Title for the merge commit message. */ - commit_title: string; - /** Commit message for the merge commit. */ - commit_message: string; - } & { [key: string]: any }) - | null; + auto_merge: { + enabled_by: components["schemas"]["simple-user"]; + /** The merge method to use. */ + merge_method: "merge" | "squash" | "rebase"; + /** Title for the merge commit message. */ + commit_title: string; + /** Commit message for the merge commit. */ + commit_message: string; + } | null; /** Pull Request Simple */ "pull-request-simple": { url: string; @@ -7952,9 +7926,9 @@ export interface components { state: string; locked: boolean; title: string; - user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + user: components["schemas"]["simple-user"] | null; body: string | null; - labels: ({ + labels: { id?: number; node_id?: string; url?: string; @@ -7962,15 +7936,15 @@ export interface components { description?: string; color?: string; default?: boolean; - } & { [key: string]: any })[]; - milestone: (components["schemas"]["milestone"] & { [key: string]: any }) | null; + }[]; + milestone: components["schemas"]["milestone"] | null; active_lock_reason?: string | null; created_at: string; updated_at: string; closed_at: string | null; merged_at: string | null; merge_commit_sha: string | null; - assignee: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + assignee: components["schemas"]["simple-user"] | null; assignees?: components["schemas"]["simple-user"][] | null; requested_reviewers?: components["schemas"]["simple-user"][] | null; requested_teams?: components["schemas"]["team-simple"][] | null; @@ -7979,15 +7953,15 @@ export interface components { ref: string; repo: components["schemas"]["repository"]; sha: string; - user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; - } & { [key: string]: any }; + user: components["schemas"]["simple-user"] | null; + }; base: { label: string; ref: string; repo: components["schemas"]["repository"]; sha: string; - user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; - } & { [key: string]: any }; + user: components["schemas"]["simple-user"] | null; + }; _links: { comments: components["schemas"]["link"]; commits: components["schemas"]["link"]; @@ -7997,12 +7971,12 @@ export interface components { review_comments: components["schemas"]["link"]; review_comment: components["schemas"]["link"]; self: components["schemas"]["link"]; - } & { [key: string]: any }; + }; author_association: components["schemas"]["author_association"]; auto_merge: components["schemas"]["auto_merge"]; /** Indicates whether or not the pull request is a draft. */ draft?: boolean; - } & { [key: string]: any }; + }; "simple-commit-status": { description: string | null; id: number; @@ -8015,7 +7989,7 @@ export interface components { url: string; created_at: string; updated_at: string; - } & { [key: string]: any }; + }; /** Combined Commit Status */ "combined-commit-status": { state: string; @@ -8025,7 +7999,7 @@ export interface components { repository: components["schemas"]["minimal-repository"]; commit_url: string; url: string; - } & { [key: string]: any }; + }; /** The status of a commit. */ status: { url: string; @@ -8039,27 +8013,27 @@ export interface components { created_at: string; updated_at: string; creator: components["schemas"]["simple-user"]; - } & { [key: string]: any }; + }; "community-health-file": { url: string; html_url: string; - } & { [key: string]: any }; + }; /** Community Profile */ "community-profile": { health_percentage: number; description: string | null; documentation: string | null; files: { - code_of_conduct: (components["schemas"]["code-of-conduct-simple"] & { [key: string]: any }) | null; - license: (components["schemas"]["license-simple"] & { [key: string]: any }) | null; - contributing: (components["schemas"]["community-health-file"] & { [key: string]: any }) | null; - readme: (components["schemas"]["community-health-file"] & { [key: string]: any }) | null; - issue_template: (components["schemas"]["community-health-file"] & { [key: string]: any }) | null; - pull_request_template: (components["schemas"]["community-health-file"] & { [key: string]: any }) | null; - } & { [key: string]: any }; + code_of_conduct: components["schemas"]["code-of-conduct-simple"] | null; + license: components["schemas"]["license-simple"] | null; + contributing: components["schemas"]["community-health-file"] | null; + readme: components["schemas"]["community-health-file"] | null; + issue_template: components["schemas"]["community-health-file"] | null; + pull_request_template: components["schemas"]["community-health-file"] | null; + }; updated_at: string | null; content_reports_enabled?: boolean; - } & { [key: string]: any }; + }; /** Diff Entry */ "diff-entry": { sha: string; @@ -8073,7 +8047,7 @@ export interface components { contents_url: string; patch?: string; previous_filename?: string; - } & { [key: string]: any }; + }; /** Commit Comparison */ "commit-comparison": { url: string; @@ -8089,7 +8063,7 @@ export interface components { total_commits: number; commits: components["schemas"]["commit"][]; files: components["schemas"]["diff-entry"][]; - } & { [key: string]: any }; + }; /** Content Tree */ "content-tree": { type: string; @@ -8101,7 +8075,7 @@ export interface components { git_url: string | null; html_url: string | null; download_url: string | null; - entries?: ({ + entries?: { type: string; size: number; name: string; @@ -8116,16 +8090,16 @@ export interface components { git: string | null; html: string | null; self: string; - } & { [key: string]: any }; - } & { [key: string]: any })[]; + }; + }[]; _links: { git: string | null; html: string | null; self: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** A list of directory items */ - "content-directory": ({ + "content-directory": { type: string; size: number; name: string; @@ -8140,8 +8114,8 @@ export interface components { git: string | null; html: string | null; self: string; - } & { [key: string]: any }; - } & { [key: string]: any })[]; + }; + }[]; /** Content File */ "content-file": { type: string; @@ -8159,10 +8133,10 @@ export interface components { git: string | null; html: string | null; self: string; - } & { [key: string]: any }; + }; target?: string; submodule_git_url?: string; - } & { [key: string]: any }; + }; /** An object describing a symlink */ "content-symlink": { type: string; @@ -8179,8 +8153,8 @@ export interface components { git: string | null; html: string | null; self: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** An object describing a symlink */ "content-submodule": { type: string; @@ -8197,28 +8171,26 @@ export interface components { git: string | null; html: string | null; self: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** File Commit */ "file-commit": { - content: - | ({ - name?: string; - path?: string; - sha?: string; - size?: number; - url?: string; - html_url?: string; - git_url?: string; - download_url?: string; - type?: string; - _links?: { - self?: string; - git?: string; - html?: string; - } & { [key: string]: any }; - } & { [key: string]: any }) - | null; + content: { + name?: string; + path?: string; + sha?: string; + size?: number; + url?: string; + html_url?: string; + git_url?: string; + download_url?: string; + type?: string; + _links?: { + self?: string; + git?: string; + html?: string; + }; + } | null; commit: { sha?: string; node_id?: string; @@ -8228,30 +8200,30 @@ export interface components { date?: string; name?: string; email?: string; - } & { [key: string]: any }; + }; committer?: { date?: string; name?: string; email?: string; - } & { [key: string]: any }; + }; message?: string; tree?: { url?: string; sha?: string; - } & { [key: string]: any }; - parents?: ({ + }; + parents?: { url?: string; html_url?: string; sha?: string; - } & { [key: string]: any })[]; + }[]; verification?: { verified?: boolean; reason?: string; signature?: string | null; payload?: string | null; - } & { [key: string]: any }; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; + }; /** Contributor */ contributor: { login?: string; @@ -8275,7 +8247,7 @@ export interface components { contributions: number; email?: string; name?: string; - } & { [key: string]: any }; + }; /** The status of a deployment. */ "deployment-status": { url: string; @@ -8283,7 +8255,7 @@ export interface components { node_id: string; /** The state of the status. */ state: "error" | "failure" | "inactive" | "pending" | "success" | "queued" | "in_progress"; - creator: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + creator: components["schemas"]["simple-user"] | null; /** A short description of the status. */ description: string; /** The environment of the deployment that the status is for. */ @@ -8298,19 +8270,17 @@ export interface components { environment_url?: string; /** The URL to associate with this status. */ log_url?: string; - performed_via_github_app?: (components["schemas"]["integration"] & { [key: string]: any }) | null; - } & { [key: string]: any }; + performed_via_github_app?: components["schemas"]["integration"] | null; + }; /** 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). */ "wait-timer": number; /** The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. */ - deployment_branch_policy: - | ({ - /** 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; - /** 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; - } & { [key: string]: any }) - | null; + deployment_branch_policy: { + /** 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; + /** 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; + } | null; /** Details of a deployment environment */ environment: { /** The id of the environment. */ @@ -8324,41 +8294,34 @@ export interface components { created_at: string; /** The time that the environment was last updated, in ISO 8601 format. */ updated_at: string; - protection_rules?: ((Partial< - { + protection_rules?: (Partial<{ + id: number; + node_id: string; + type: string; + wait_timer?: components["schemas"]["wait-timer"]; + }> & + Partial<{ id: number; node_id: string; type: string; - wait_timer?: components["schemas"]["wait-timer"]; - } & { [key: string]: any } - > & - Partial< - { - id: number; - node_id: string; - type: string; - /** 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?: ({ - type?: components["schemas"]["deployment-reviewer-type"]; - reviewer?: (Partial & - Partial) & { [key: string]: any }; - } & { [key: string]: any })[]; - } & { [key: string]: any } - > & - Partial< - { - id: number; - node_id: string; - type: string; - } & { [key: string]: any } - >) & { [key: string]: any })[]; + /** 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?: { + type?: components["schemas"]["deployment-reviewer-type"]; + reviewer?: Partial & Partial; + }[]; + }> & + Partial<{ + id: number; + node_id: string; + type: string; + }>)[]; deployment_branch_policy?: components["schemas"]["deployment_branch_policy"]; - } & { [key: string]: any }; + }; /** Short Blob */ "short-blob": { url: string; sha: string; - } & { [key: string]: any }; + }; /** Blob */ blob: { content: string; @@ -8368,7 +8331,7 @@ export interface components { size: number | null; node_id: string; highlighted_content?: string; - } & { [key: string]: any }; + }; /** Low-level Git commit operations within a repository */ "git-commit": { /** SHA for the commit */ @@ -8383,7 +8346,7 @@ export interface components { email: string; /** Name of the git user */ name: string; - } & { [key: string]: any }; + }; /** Identifying information for the git-user */ committer: { /** Timestamp of the commit */ @@ -8392,28 +8355,28 @@ export interface components { email: string; /** Name of the git user */ name: string; - } & { [key: string]: any }; + }; /** Message describing the purpose of the commit */ message: string; tree: { /** SHA for the commit */ sha: string; url: string; - } & { [key: string]: any }; - parents: ({ + }; + parents: { /** SHA for the commit */ sha: string; url: string; html_url: string; - } & { [key: string]: any })[]; + }[]; verification: { verified: boolean; reason: string; signature: string | null; payload: string | null; - } & { [key: string]: any }; + }; html_url: string; - } & { [key: string]: any }; + }; /** Git references within a repository */ "git-ref": { ref: string; @@ -8424,8 +8387,8 @@ export interface components { /** SHA for the reference */ sha: string; url: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** Metadata for a Git tag */ "git-tag": { node_id: string; @@ -8440,34 +8403,34 @@ export interface components { date: string; email: string; name: string; - } & { [key: string]: any }; + }; object: { sha: string; type: string; url: string; - } & { [key: string]: any }; + }; verification?: components["schemas"]["verification"]; - } & { [key: string]: any }; + }; /** The hierarchy between files in a Git repository. */ "git-tree": { sha: string; url: string; truncated: boolean; /** Objects specifying a tree structure */ - tree: ({ + tree: { path?: string; mode?: string; type?: string; sha?: string; size?: number; url?: string; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; "hook-response": { code: number | null; status: string | null; message: string | null; - } & { [key: string]: any }; + }; /** Webhooks for repositories. */ hook: { type: string; @@ -8490,14 +8453,14 @@ export interface components { digest?: string; secret?: components["schemas"]["webhook-config-secret"]; token?: string; - } & { [key: string]: any }; + }; updated_at: string; created_at: string; url: string; test_url: string; ping_url: string; last_response: components["schemas"]["hook-response"]; - } & { [key: string]: any }; + }; /** A repository import from an external source. */ import: { vcs: string | null; @@ -8532,11 +8495,11 @@ export interface components { has_large_files?: boolean; large_files_size?: number; large_files_count?: number; - project_choices?: ({ + project_choices?: { vcs?: string; tfvc_project?: string; human_name?: string; - } & { [key: string]: any })[]; + }[]; message?: string; authors_count?: number | null; url: string; @@ -8544,7 +8507,7 @@ export interface components { authors_url: string; repository_url: string; svn_root?: string; - } & { [key: string]: any }; + }; /** Porter Author */ "porter-author": { id: number; @@ -8554,29 +8517,29 @@ export interface components { name: string; url: string; import_url: string; - } & { [key: string]: any }; + }; /** Porter Large File */ "porter-large-file": { ref_name: string; path: string; oid: string; size: number; - } & { [key: string]: any }; + }; /** Issue Event Label */ "issue-event-label": { name: string | null; color: string | null; - } & { [key: string]: any }; + }; "issue-event-dismissed-review": { state: string; review_id: number; dismissal_message: string | null; dismissal_commit_id?: string | null; - } & { [key: string]: any }; + }; /** Issue Event Milestone */ "issue-event-milestone": { title: string; - } & { [key: string]: any }; + }; /** Issue Event Project Card */ "issue-event-project-card": { url: string; @@ -8585,28 +8548,28 @@ export interface components { project_id: number; column_name: string; previous_column_name?: string; - } & { [key: string]: any }; + }; /** Issue Event Rename */ "issue-event-rename": { from: string; to: string; - } & { [key: string]: any }; + }; /** Issue Event */ "issue-event": { id: number; node_id: string; url: string; - actor: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + actor: components["schemas"]["simple-user"] | null; event: string; commit_id: string | null; commit_url: string | null; created_at: string; issue?: components["schemas"]["issue-simple"]; label?: components["schemas"]["issue-event-label"]; - assignee?: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; - assigner?: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; - review_requester?: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; - requested_reviewer?: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + assignee?: components["schemas"]["simple-user"] | null; + assigner?: components["schemas"]["simple-user"] | null; + review_requester?: components["schemas"]["simple-user"] | null; + requested_reviewer?: components["schemas"]["simple-user"] | null; requested_team?: components["schemas"]["team"]; dismissed_review?: components["schemas"]["issue-event-dismissed-review"]; milestone?: components["schemas"]["issue-event-milestone"]; @@ -8614,7 +8577,7 @@ export interface components { rename?: components["schemas"]["issue-event-rename"]; author_association?: components["schemas"]["author_association"]; lock_reason?: string | null; - } & { [key: string]: any }; + }; /** Issue Event for Issue */ "issue-event-for-issue": { id?: number; @@ -8638,7 +8601,7 @@ export interface components { pull_request_url?: string; body_html?: string; body_text?: string; - } & { [key: string]: any }; + }; /** An SSH key granting access to a single repository. */ "deploy-key": { id: number; @@ -8648,7 +8611,7 @@ export interface components { verified: boolean; created_at: string; read_only: boolean; - } & { [key: string]: any }; + }; /** Language */ language: { [key: string]: number }; /** License Content */ @@ -8668,13 +8631,13 @@ export interface components { git: string | null; html: string | null; self: string; - } & { [key: string]: any }; - license: (components["schemas"]["license-simple"] & { [key: string]: any }) | null; - } & { [key: string]: any }; + }; + license: components["schemas"]["license-simple"] | null; + }; "pages-source-hash": { branch: string; path: string; - } & { [key: string]: any }; + }; /** The configuration for GitHub Pages for a repository. */ page: { /** The API address for accessing this Page resource. */ @@ -8690,25 +8653,25 @@ export interface components { source?: components["schemas"]["pages-source-hash"]; /** 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. */ public: boolean; - } & { [key: string]: any }; + }; /** Page Build */ "page-build": { url: string; status: string; error: { message: string | null; - } & { [key: string]: any }; - pusher: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + }; + pusher: components["schemas"]["simple-user"] | null; commit: string; duration: number; created_at: string; updated_at: string; - } & { [key: string]: any }; + }; /** Page Build Status */ "page-build-status": { url: string; status: string; - } & { [key: string]: any }; + }; /** 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": { url: string; @@ -8730,9 +8693,9 @@ export interface components { locked: boolean; /** The title of the pull request. */ title: string; - user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + user: components["schemas"]["simple-user"] | null; body: string | null; - labels: ({ + labels: { id?: number; node_id?: string; url?: string; @@ -8740,15 +8703,15 @@ export interface components { description?: string | null; color?: string; default?: boolean; - } & { [key: string]: any })[]; - milestone: (components["schemas"]["milestone"] & { [key: string]: any }) | null; + }[]; + milestone: components["schemas"]["milestone"] | null; active_lock_reason?: string | null; created_at: string; updated_at: string; closed_at: string | null; merged_at: string | null; merge_commit_sha: string | null; - assignee: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + assignee: components["schemas"]["simple-user"] | null; assignees?: components["schemas"]["simple-user"][] | null; requested_reviewers?: components["schemas"]["simple-user"][] | null; requested_teams?: components["schemas"]["team-simple"][] | null; @@ -8809,7 +8772,7 @@ export interface components { subscriptions_url: string; type: string; url: string; - } & { [key: string]: any }; + }; private: boolean; pulls_url: string; releases_url: string; @@ -8843,20 +8806,18 @@ export interface components { admin: boolean; pull: boolean; push: boolean; - } & { [key: string]: any }; + }; temp_clone_token?: string; allow_merge_commit?: boolean; allow_squash_merge?: boolean; allow_rebase_merge?: boolean; - license: - | ({ - key: string; - name: string; - url: string | null; - spdx_id: string | null; - node_id: string; - } & { [key: string]: any }) - | null; + license: { + key: string; + name: string; + url: string | null; + spdx_id: string | null; + node_id: string; + } | null; pushed_at: string; size: number; ssh_url: string; @@ -8867,7 +8828,7 @@ export interface components { watchers_count: number; created_at: string; updated_at: string; - } & { [key: string]: any }; + }; sha: string; user: { avatar_url: string; @@ -8888,8 +8849,8 @@ export interface components { subscriptions_url: string; type: string; url: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; base: { label: string; ref: string; @@ -8947,7 +8908,7 @@ export interface components { subscriptions_url: string; type: string; url: string; - } & { [key: string]: any }; + }; private: boolean; pulls_url: string; releases_url: string; @@ -8981,12 +8942,12 @@ export interface components { admin: boolean; pull: boolean; push: boolean; - } & { [key: string]: any }; + }; temp_clone_token?: string; allow_merge_commit?: boolean; allow_squash_merge?: boolean; allow_rebase_merge?: boolean; - license: (components["schemas"]["license-simple"] & { [key: string]: any }) | null; + license: components["schemas"]["license-simple"] | null; pushed_at: string; size: number; ssh_url: string; @@ -8997,7 +8958,7 @@ export interface components { watchers_count: number; created_at: string; updated_at: string; - } & { [key: string]: any }; + }; sha: string; user: { avatar_url: string; @@ -9018,8 +8979,8 @@ export interface components { subscriptions_url: string; type: string; url: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; _links: { comments: components["schemas"]["link"]; commits: components["schemas"]["link"]; @@ -9029,7 +8990,7 @@ export interface components { review_comments: components["schemas"]["link"]; review_comment: components["schemas"]["link"]; self: components["schemas"]["link"]; - } & { [key: string]: any }; + }; author_association: components["schemas"]["author_association"]; auto_merge: components["schemas"]["auto_merge"]; /** Indicates whether or not the pull request is a draft. */ @@ -9038,7 +8999,7 @@ export interface components { mergeable: boolean | null; rebaseable?: boolean | null; mergeable_state: string; - merged_by: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + merged_by: components["schemas"]["simple-user"] | null; comments: number; review_comments: number; /** Indicates whether maintainers can modify the pull request. */ @@ -9047,7 +9008,7 @@ export interface components { additions: number; deletions: number; changed_files: number; - } & { [key: string]: any }; + }; /** Pull Request Review Comments are comments on a portion of the Pull Request's diff. */ "pull-request-review-comment": { /** URL for the pull request review comment */ @@ -9085,14 +9046,14 @@ export interface components { _links: { self: { href: string; - } & { [key: string]: any }; + }; html: { href: string; - } & { [key: string]: any }; + }; pull_request: { href: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** The first line of the range for a multi-line comment. */ start_line?: number | null; /** The first line of the range for a multi-line comment. */ @@ -9108,24 +9069,24 @@ export interface components { reactions?: components["schemas"]["reaction-rollup"]; body_html?: string; body_text?: string; - } & { [key: string]: any }; + }; /** Pull Request Merge Result */ "pull-request-merge-result": { sha: string; merged: boolean; message: string; - } & { [key: string]: any }; + }; /** Pull Request Review Request */ "pull-request-review-request": { users: components["schemas"]["simple-user"][]; teams: components["schemas"]["team-simple"][]; - } & { [key: string]: any }; + }; /** Pull Request Reviews are reviews on pull requests. */ "pull-request-review": { /** Unique identifier of the review */ id: number; node_id: string; - user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + user: components["schemas"]["simple-user"] | null; /** The text of the review. */ body: string; state: string; @@ -9134,18 +9095,18 @@ export interface components { _links: { html: { href: string; - } & { [key: string]: any }; + }; pull_request: { href: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; submitted_at?: string; /** A commit SHA for the review. */ commit_id: string; body_html?: string; body_text?: string; author_association: components["schemas"]["author_association"]; - } & { [key: string]: any }; + }; /** Legacy Review Comment */ "review-comment": { url: string; @@ -9159,7 +9120,7 @@ export interface components { commit_id: string; original_commit_id: string; in_reply_to_id?: number; - user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + user: components["schemas"]["simple-user"] | null; body: string; created_at: string; updated_at: string; @@ -9170,7 +9131,7 @@ export interface components { self: components["schemas"]["link"]; html: components["schemas"]["link"]; pull_request: components["schemas"]["link"]; - } & { [key: string]: any }; + }; body_text?: string; body_html?: string; /** The side of the first line of the range for a multi-line comment. */ @@ -9185,7 +9146,7 @@ export interface components { start_line?: number | null; /** The original first line of the range for a multi-line comment. */ original_start_line?: number | null; - } & { [key: string]: any }; + }; /** Data related to a release. */ "release-asset": { url: string; @@ -9202,8 +9163,8 @@ export interface components { download_count: number; created_at: string; updated_at: string; - uploader: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; - } & { [key: string]: any }; + uploader: components["schemas"]["simple-user"] | null; + }; /** A release. */ release: { url: string; @@ -9230,7 +9191,7 @@ export interface components { assets: components["schemas"]["release-asset"][]; body_html?: string; body_text?: string; - } & { [key: string]: any }; + }; /** 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`. */ "secret-scanning-alert-state": "open" | "resolved"; /** **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`. */ @@ -9249,12 +9210,12 @@ export interface components { secret_type?: string; /** The secret that was detected. */ secret?: string; - } & { [key: string]: any }; + }; /** Stargazer */ stargazer: { starred_at: string; - user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; - } & { [key: string]: any }; + user: components["schemas"]["simple-user"] | null; + }; /** Code Frequency Stat */ "code-frequency-stat": number[]; /** Commit Activity */ @@ -9262,22 +9223,22 @@ export interface components { days: number[]; total: number; week: number; - } & { [key: string]: any }; + }; /** Contributor Activity */ "contributor-activity": { - author: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + author: components["schemas"]["simple-user"] | null; total: number; - weeks: ({ + weeks: { w?: string; a?: number; d?: number; c?: number; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; "participation-stats": { all: number[]; owner: number[]; - } & { [key: string]: any }; + }; /** Repository invitations let you manage who you collaborate with. */ "repository-subscription": { /** Determines if notifications should be received from this repository. */ @@ -9288,98 +9249,98 @@ export interface components { created_at: string; url: string; repository_url: string; - } & { [key: string]: any }; + }; /** Tag */ tag: { name: string; commit: { sha: string; url: string; - } & { [key: string]: any }; + }; zipball_url: string; tarball_url: string; node_id: string; - } & { [key: string]: any }; + }; /** A topic aggregates entities that are related to a subject. */ topic: { names: string[]; - } & { [key: string]: any }; + }; traffic: { timestamp: string; uniques: number; count: number; - } & { [key: string]: any }; + }; /** Clone Traffic */ "clone-traffic": { count: number; uniques: number; clones: components["schemas"]["traffic"][]; - } & { [key: string]: any }; + }; /** Content Traffic */ "content-traffic": { path: string; title: string; count: number; uniques: number; - } & { [key: string]: any }; + }; /** Referrer Traffic */ "referrer-traffic": { referrer: string; count: number; uniques: number; - } & { [key: string]: any }; + }; /** View Traffic */ "view-traffic": { count: number; uniques: number; views: components["schemas"]["traffic"][]; - } & { [key: string]: any }; + }; "scim-group-list-enterprise": { schemas: string[]; totalResults: number; itemsPerPage: number; startIndex: number; - Resources: ({ + Resources: { schemas: string[]; id: string; externalId?: string | null; displayName?: string; - members?: ({ + members?: { value?: string; $ref?: string; display?: string; - } & { [key: string]: any })[]; + }[]; meta?: { resourceType?: string; created?: string; lastModified?: string; location?: string; - } & { [key: string]: any }; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }; + }[]; + }; "scim-enterprise-group": { schemas: string[]; id: string; externalId?: string | null; displayName?: string; - members?: ({ + members?: { value?: string; $ref?: string; display?: string; - } & { [key: string]: any })[]; + }[]; meta?: { resourceType?: string; created?: string; lastModified?: string; location?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; "scim-user-list-enterprise": { schemas: string[]; totalResults: number; itemsPerPage: number; startIndex: number; - Resources: ({ + Resources: { schemas: string[]; id: string; externalId?: string; @@ -9387,24 +9348,24 @@ export interface components { name?: { givenName?: string; familyName?: string; - } & { [key: string]: any }; - emails?: ({ + }; + emails?: { value?: string; primary?: boolean; type?: string; - } & { [key: string]: any })[]; - groups?: ({ + }[]; + groups?: { value?: string; - } & { [key: string]: any })[]; + }[]; active?: boolean; meta?: { resourceType?: string; created?: string; lastModified?: string; location?: string; - } & { [key: string]: any }; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }; + }[]; + }; "scim-enterprise-user": { schemas: string[]; id: string; @@ -9413,23 +9374,23 @@ export interface components { name?: { givenName?: string; familyName?: string; - } & { [key: string]: any }; - emails?: ({ + }; + emails?: { value?: string; type?: string; primary?: boolean; - } & { [key: string]: any })[]; - groups?: ({ + }[]; + groups?: { value?: string; - } & { [key: string]: any })[]; + }[]; active?: boolean; meta?: { resourceType?: string; created?: string; lastModified?: string; location?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** SCIM /Users provisioning endpoints */ "scim-user": { /** SCIM schema used. */ @@ -9446,12 +9407,12 @@ export interface components { givenName: string | null; familyName: string | null; formatted?: string | null; - } & { [key: string]: any }; + }; /** user emails */ - emails: ({ + emails: { value: string; primary?: boolean; - } & { [key: string]: any })[]; + }[]; /** The active status of the User. */ active: boolean; meta: { @@ -9459,21 +9420,21 @@ export interface components { created?: string; lastModified?: string; location?: string; - } & { [key: string]: any }; + }; /** The ID of the organization. */ organization_id?: number; /** Set of operations to be performed */ - operations?: ({ + operations?: { op: "add" | "remove" | "replace"; path?: string; - value?: (string | { [key: string]: any } | { [key: string]: any }[]) & { [key: string]: any }; - } & { [key: string]: any })[]; + value?: string | { [key: string]: any } | { [key: string]: any }[]; + }[]; /** associated groups */ - groups?: ({ + groups?: { value?: string; display?: string; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; /** SCIM User List */ "scim-user-list": { /** SCIM schema used. */ @@ -9482,17 +9443,17 @@ export interface components { itemsPerPage: number; startIndex: number; Resources: components["schemas"]["scim-user"][]; - } & { [key: string]: any }; - "search-result-text-matches": ({ + }; + "search-result-text-matches": { object_url?: string; object_type?: string | null; property?: string; fragment?: string; - matches?: ({ + matches?: { text?: string; indices?: number[]; - } & { [key: string]: any })[]; - } & { [key: string]: any })[]; + }[]; + }[]; /** Code Search Result Item */ "code-search-result-item": { name: string; @@ -9508,7 +9469,7 @@ export interface components { last_modified_at?: string; line_numbers?: string[]; text_matches?: components["schemas"]["search-result-text-matches"]; - } & { [key: string]: any }; + }; /** Commit Search Result Item */ "commit-search-result-item": { url: string; @@ -9520,29 +9481,29 @@ export interface components { name: string; email: string; date: string; - } & { [key: string]: any }; - committer: (components["schemas"]["git-user"] & { [key: string]: any }) | null; + }; + committer: components["schemas"]["git-user"] | null; comment_count: number; message: string; tree: { sha: string; url: string; - } & { [key: string]: any }; + }; url: string; verification?: components["schemas"]["verification"]; - } & { [key: string]: any }; - author: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; - committer: (components["schemas"]["git-user"] & { [key: string]: any }) | null; - parents: ({ + }; + author: components["schemas"]["simple-user"] | null; + committer: components["schemas"]["git-user"] | null; + parents: { url?: string; html_url?: string; sha?: string; - } & { [key: string]: any })[]; + }[]; repository: components["schemas"]["minimal-repository"]; score: number; node_id: string; text_matches?: components["schemas"]["search-result-text-matches"]; - } & { [key: string]: any }; + }; /** Issue Search Result Item */ "issue-search-result-item": { url: string; @@ -9558,8 +9519,8 @@ export interface components { locked: boolean; active_lock_reason?: string | null; assignees?: components["schemas"]["simple-user"][] | null; - user: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; - labels: ({ + user: components["schemas"]["simple-user"] | null; + labels: { id?: number; node_id?: string; url?: string; @@ -9567,10 +9528,10 @@ export interface components { color?: string; default?: boolean; description?: string | null; - } & { [key: string]: any })[]; + }[]; state: string; - assignee: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; - milestone: (components["schemas"]["milestone"] & { [key: string]: any }) | null; + assignee: components["schemas"]["simple-user"] | null; + milestone: components["schemas"]["milestone"] | null; comments: number; created_at: string; updated_at: string; @@ -9582,7 +9543,7 @@ export interface components { html_url: string | null; patch_url: string | null; url: string | null; - } & { [key: string]: any }; + }; body?: string; score: number; author_association: components["schemas"]["author_association"]; @@ -9591,8 +9552,8 @@ export interface components { body_html?: string; body_text?: string; timeline_url?: string; - performed_via_github_app?: (components["schemas"]["integration"] & { [key: string]: any }) | null; - } & { [key: string]: any }; + performed_via_github_app?: components["schemas"]["integration"] | null; + }; /** Label Search Result Item */ "label-search-result-item": { id: number; @@ -9604,14 +9565,14 @@ export interface components { description: string | null; score: number; text_matches?: components["schemas"]["search-result-text-matches"]; - } & { [key: string]: any }; + }; /** Repo Search Result Item */ "repo-search-result-item": { id: number; node_id: string; name: string; full_name: string; - owner: (components["schemas"]["simple-user"] & { [key: string]: any }) | null; + owner: components["schemas"]["simple-user"] | null; private: boolean; html_url: string; description: string | null; @@ -9683,19 +9644,19 @@ export interface components { archived: boolean; /** Returns whether or not this repository disabled. */ disabled: boolean; - license: (components["schemas"]["license-simple"] & { [key: string]: any }) | null; + license: components["schemas"]["license-simple"] | null; permissions?: { admin: boolean; pull: boolean; push: boolean; - } & { [key: string]: any }; + }; text_matches?: components["schemas"]["search-result-text-matches"]; temp_clone_token?: string; allow_merge_commit?: boolean; allow_squash_merge?: boolean; allow_rebase_merge?: boolean; delete_branch_on_merge?: boolean; - } & { [key: string]: any }; + }; /** Topic Search Result Item */ "topic-search-result-item": { name: string; @@ -9713,26 +9674,26 @@ export interface components { logo_url?: string | null; text_matches?: components["schemas"]["search-result-text-matches"]; related?: - | ({ + | { topic_relation?: { id?: number; name?: string; topic_id?: number; relation_type?: string; - } & { [key: string]: any }; - } & { [key: string]: any })[] + }; + }[] | null; aliases?: - | ({ + | { topic_relation?: { id?: number; name?: string; topic_id?: number; relation_type?: string; - } & { [key: string]: any }; - } & { [key: string]: any })[] + }; + }[] | null; - } & { [key: string]: any }; + }; /** User Search Result Item */ "user-search-result-item": { login: string; @@ -9769,7 +9730,7 @@ export interface components { blog?: string | null; company?: string | null; suspended_at?: string | null; - } & { [key: string]: any }; + }; /** Private User */ "private-user": { login: string; @@ -9815,11 +9776,11 @@ export interface components { name: string; space: number; private_repos: number; - } & { [key: string]: any }; + }; suspended_at?: string | null; business_plus?: boolean; ldap_dn?: string; - } & { [key: string]: any }; + }; /** Public User */ "public-user": { login: string; @@ -9859,7 +9820,7 @@ export interface components { name: string; space: number; private_repos: number; - } & { [key: string]: any }; + }; suspended_at?: string | null; private_gists?: number; total_private_repos?: number; @@ -9873,18 +9834,18 @@ export interface components { primary: boolean; verified: boolean; visibility: string | null; - } & { [key: string]: any }; + }; /** A unique encryption key */ "gpg-key": { id: number; primary_key_id: number | null; key_id: string; public_key: string; - emails: ({ + emails: { email?: string; verified?: boolean; - } & { [key: string]: any })[]; - subkeys: ({ + }[]; + subkeys: { id?: number; primary_key_id?: number; key_id?: string; @@ -9898,7 +9859,7 @@ export interface components { created_at?: string; expires_at?: string | null; raw_key?: string | null; - } & { [key: string]: any })[]; + }[]; can_sign: boolean; can_encrypt_comms: boolean; can_encrypt_storage: boolean; @@ -9906,7 +9867,7 @@ export interface components { created_at: string; expires_at: string | null; raw_key: string | null; - } & { [key: string]: any }; + }; /** Key */ key: { key_id: string; @@ -9917,7 +9878,7 @@ export interface components { created_at: string; verified: boolean; read_only: boolean; - } & { [key: string]: any }; + }; "marketplace-account": { url: string; id: number; @@ -9926,7 +9887,7 @@ export interface components { login: string; email?: string | null; organization_billing_email?: string | null; - } & { [key: string]: any }; + }; /** User Marketplace Purchase */ "user-marketplace-purchase": { billing_cycle: string; @@ -9937,24 +9898,24 @@ export interface components { updated_at: string | null; account: components["schemas"]["marketplace-account"]; plan: components["schemas"]["marketplace-listing-plan"]; - } & { [key: string]: any }; + }; /** Starred Repository */ "starred-repository": { starred_at: string; repo: components["schemas"]["repository"]; - } & { [key: string]: any }; + }; /** Hovercard */ hovercard: { - contexts: ({ + contexts: { message: string; octicon: string; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; /** Key Simple */ "key-simple": { id: number; key: string; - } & { [key: string]: any }; + }; }; responses: { /** Resource Not Found */ @@ -9975,7 +9936,7 @@ export interface components { "application/json": { message: string; documentation_url: string; - } & { [key: string]: any }; + }; }; }; /** Forbidden */ @@ -10011,7 +9972,7 @@ export interface components { code?: string; message?: string; documentation_url?: string; - } & { [key: string]: any }; + }; }; }; /** Forbidden Gist */ @@ -10022,10 +9983,10 @@ export interface components { reason?: string; created_at?: string; html_url?: string | null; - } & { [key: string]: any }; + }; message?: string; documentation_url?: string; - } & { [key: string]: any }; + }; }; }; /** Moved Permanently */ @@ -10228,7 +10189,7 @@ export interface components { /** The id of the workflow run */ "run-id": number; /** The ID of the workflow. You can also pass the workflow file name as a string. */ - "workflow-id": (number | string) & { [key: string]: any }; + "workflow-id": number | string; /** The name of the branch. */ branch: string; /** check_run_id parameter */ @@ -10338,7 +10299,7 @@ export interface operations { user_organizations_url: string; user_repositories_url: string; user_search_url: string; - } & { [key: string]: any }; + }; }; }; }; @@ -10376,7 +10337,7 @@ export interface operations { client_secret: string; webhook_secret: string; pem: string; - } & { [key: string]: any }) & { [key: string]: any }; + } & { [key: string]: any }); }; }; 404: components["responses"]["not_found"]; @@ -10419,7 +10380,7 @@ export interface operations { content_type?: components["schemas"]["webhook-config-content-type"]; secret?: components["schemas"]["webhook-config-secret"]; insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; - } & { [key: string]: any }; + }; }; }; }; @@ -10524,7 +10485,7 @@ export interface operations { /** List of repository IDs that the token should have access to */ repository_ids?: number[]; permissions?: components["schemas"]["app-permissions"]; - } & { [key: string]: any }; + }; }; }; }; @@ -10653,7 +10614,7 @@ export interface operations { "application/json": { /** The OAuth access token used to authenticate to the GitHub API. */ access_token?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -10700,7 +10661,7 @@ export interface operations { "application/json": { /** The access_token of the OAuth application. */ access_token: string; - } & { [key: string]: any }; + }; }; }; }; @@ -10722,7 +10683,7 @@ export interface operations { "application/json": { /** The OAuth access token used to authenticate to the GitHub API. */ access_token?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -10748,7 +10709,7 @@ export interface operations { "application/json": { /** The access_token of the OAuth application. */ access_token: string; - } & { [key: string]: any }; + }; }; }; }; @@ -10786,7 +10747,7 @@ export interface operations { /** The list of repository names to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. */ repository_ids?: number[]; permissions?: components["schemas"]["app-permissions"]; - } & { [key: string]: any }; + }; }; }; }; @@ -10807,7 +10768,7 @@ export interface operations { /** response */ 200: { content: { - "application/json": (components["schemas"]["authorization"] & { [key: string]: any }) | null; + "application/json": components["schemas"]["authorization"] | null; }; }; 404: components["responses"]["not_found"]; @@ -10946,7 +10907,7 @@ export interface operations { client_secret?: string; /** A unique string to distinguish an authorization from others created for the same client ID and user. */ fingerprint?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -11005,7 +10966,7 @@ export interface operations { note_url?: string; /** A unique string to distinguish an authorization from others created for the same client ID and user. */ fingerprint?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -11058,7 +11019,7 @@ export interface operations { note?: string; /** A URL to remind you what app the OAuth token is for. */ note_url?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -11136,7 +11097,7 @@ export interface operations { note_url?: string; /** A unique string to distinguish an authorization from others created for the same client ID and user. */ fingerprint?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -11205,7 +11166,7 @@ export interface operations { title: string; /** The body of the attachment */ body: string; - } & { [key: string]: any }; + }; }; }; }; @@ -11264,7 +11225,7 @@ export interface operations { "application/json": { enabled_organizations: components["schemas"]["enabled-organizations"]; allowed_actions?: components["schemas"]["allowed-actions"]; - } & { [key: string]: any }; + }; }; }; }; @@ -11293,7 +11254,7 @@ export interface operations { "application/json": { total_count: number; organizations: components["schemas"]["organization-simple"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -11319,7 +11280,7 @@ export interface operations { "application/json": { /** List of organization IDs to enable for GitHub Actions. */ selected_organization_ids: number[]; - } & { [key: string]: any }; + }; }; }; }; @@ -11429,7 +11390,7 @@ export interface operations { "application/json": { total_count: number; runner_groups: components["schemas"]["runner-groups-enterprise"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -11465,7 +11426,7 @@ export interface operations { selected_organization_ids?: number[]; /** List of runner IDs to add to the runner group. */ runners?: number[]; - } & { [key: string]: any }; + }; }; }; }; @@ -11540,7 +11501,7 @@ export interface operations { name?: string; /** Visibility of a runner group. You can select all organizations or select individual organizations. Can be one of: `all` or `selected` */ visibility?: "selected" | "all"; - } & { [key: string]: any }; + }; }; }; }; @@ -11571,7 +11532,7 @@ export interface operations { "application/json": { total_count: number; organizations: components["schemas"]["organization-simple"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -11599,7 +11560,7 @@ export interface operations { "application/json": { /** List of organization IDs that can access the runner group. */ selected_organization_ids: number[]; - } & { [key: string]: any }; + }; }; }; }; @@ -11673,7 +11634,7 @@ export interface operations { "application/json": { total_count: number; runners: components["schemas"]["runner"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -11701,7 +11662,7 @@ export interface operations { "application/json": { /** List of runner IDs to add to the runner group. */ runners: number[]; - } & { [key: string]: any }; + }; }; }; }; @@ -11774,7 +11735,7 @@ export interface operations { "application/json": { total_count?: number; runners?: components["schemas"]["runner"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -12119,10 +12080,10 @@ export interface operations { [key: string]: { /** Content of the file */ content: string; - } & { [key: string]: any }; + }; }; - public?: (boolean | ("true" | "false")) & { [key: string]: any }; - } & { [key: string]: any }; + public?: boolean | ("true" | "false"); + }; }; }; }; @@ -12244,7 +12205,7 @@ export interface operations { Partial<{ [key: string]: any }> & Partial<{ [key: string]: any }>; }; - } & { [key: string]: any }) + }) | null; }; }; @@ -12301,7 +12262,7 @@ export interface operations { "application/json": { /** The comment text. */ body: string; - } & { [key: string]: any }; + }; }; }; }; @@ -12366,7 +12327,7 @@ export interface operations { "application/json": { /** The comment text. */ body: string; - } & { [key: string]: any }; + }; }; }; }; @@ -12575,7 +12536,7 @@ export interface operations { total_count: number; repositories: components["schemas"]["repository"][]; repository_selection?: string; - } & { [key: string]: any }; + }; }; }; 304: components["responses"]["not_modified"]; @@ -12712,7 +12673,7 @@ export interface operations { mode?: "markdown" | "gfm"; /** The repository context to use when creating references in `gfm` mode. */ context?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -12991,7 +12952,7 @@ export interface operations { content: { "application/json": { message?: string; - } & { [key: string]: any }; + }; }; }; /** response */ @@ -13007,7 +12968,7 @@ export interface operations { last_read_at?: string; /** Whether the notification has been read. */ read?: boolean; - } & { [key: string]: any }; + }; }; }; }; @@ -13098,7 +13059,7 @@ export interface operations { "application/json": { /** Whether to block all notifications from a thread. */ ignored?: boolean; - } & { [key: string]: any }; + }; }; }; }; @@ -13206,10 +13167,9 @@ export interface operations { /** Validation Failed */ 422: { content: { - "application/json": ( + "application/json": | components["schemas"]["validation-error"] - | components["schemas"]["validation-error-simple"] - ) & { [key: string]: any }; + | components["schemas"]["validation-error-simple"]; }; }; }; @@ -13298,7 +13258,7 @@ export interface operations { */ members_can_create_private_pages?: boolean; blog?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -13344,7 +13304,7 @@ export interface operations { "application/json": { enabled_repositories: components["schemas"]["enabled-repositories"]; allowed_actions?: components["schemas"]["allowed-actions"]; - } & { [key: string]: any }; + }; }; }; }; @@ -13372,7 +13332,7 @@ export interface operations { "application/json": { total_count: number; repositories: components["schemas"]["repository"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -13397,7 +13357,7 @@ export interface operations { "application/json": { /** List of repository IDs to enable for GitHub Actions. */ selected_repository_ids: number[]; - } & { [key: string]: any }; + }; }; }; }; @@ -13506,7 +13466,7 @@ export interface operations { "application/json": { total_count: number; runner_groups: components["schemas"]["runner-groups-org"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -13543,7 +13503,7 @@ export interface operations { selected_repository_ids?: number[]; /** List of runner IDs to add to the runner group. */ runners?: number[]; - } & { [key: string]: any }; + }; }; }; }; @@ -13621,7 +13581,7 @@ export interface operations { name?: string; /** 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`. */ visibility?: "selected" | "all" | "private"; - } & { [key: string]: any }; + }; }; }; }; @@ -13647,7 +13607,7 @@ export interface operations { "application/json": { total_count: number; repositories: components["schemas"]["repository"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -13676,7 +13636,7 @@ export interface operations { "application/json": { /** List of repository IDs that can access the runner group. */ selected_repository_ids: number[]; - } & { [key: string]: any }; + }; }; }; }; @@ -13754,7 +13714,7 @@ export interface operations { "application/json": { total_count: number; runners: components["schemas"]["runner"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -13783,7 +13743,7 @@ export interface operations { "application/json": { /** List of runner IDs to add to the runner group. */ runners: number[]; - } & { [key: string]: any }; + }; }; }; }; @@ -13859,7 +13819,7 @@ export interface operations { "application/json": { total_count: number; runners: components["schemas"]["runner"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -14002,7 +13962,7 @@ export interface operations { "application/json": { total_count: number; secrets: components["schemas"]["organization-actions-secret"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -14148,7 +14108,7 @@ export interface operations { visibility?: "all" | "private" | "selected"; /** 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[]; - } & { [key: string]: any }; + }; }; }; }; @@ -14182,7 +14142,7 @@ export interface operations { "application/json": { total_count: number; repositories: components["schemas"]["minimal-repository"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -14205,7 +14165,7 @@ export interface operations { "application/json": { /** 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[]; - } & { [key: string]: any }; + }; }; }; }; @@ -14490,12 +14450,12 @@ export interface operations { insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; username?: string; password?: string; - } & { [key: string]: any }; + }; /** Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. */ events?: string[]; /** Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. */ active?: boolean; - } & { [key: string]: any }; + }; }; }; }; @@ -14557,13 +14517,13 @@ export interface operations { content_type?: components["schemas"]["webhook-config-content-type"]; secret?: components["schemas"]["webhook-config-secret"]; insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; - } & { [key: string]: any }; + }; /** Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. */ events?: string[]; /** Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. */ active?: boolean; name?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -14615,7 +14575,7 @@ export interface operations { content_type?: components["schemas"]["webhook-config-content-type"]; secret?: components["schemas"]["webhook-config-secret"]; insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; - } & { [key: string]: any }; + }; }; }; }; @@ -14674,7 +14634,7 @@ export interface operations { "application/json": { total_count: number; installations: components["schemas"]["installation"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -14790,7 +14750,7 @@ export interface operations { role?: "admin" | "direct_member" | "billing_manager"; /** Specify IDs for the teams you want to invite new members to. */ team_ids?: number[]; - } & { [key: string]: any }; + }; }; }; }; @@ -15016,7 +14976,7 @@ export interface operations { * \* `member` - The user will become a non-owner member of the organization. */ role?: "admin" | "member"; - } & { [key: string]: any }; + }; }; }; }; @@ -15089,7 +15049,7 @@ export interface operations { /** Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). */ exclude_attachments?: boolean; exclude?: string[]; - } & { [key: string]: any }; + }; }; }; }; @@ -15247,7 +15207,7 @@ export interface operations { "application/json": { message?: string; documentation_url?: string; - } & { [key: string]: any }; + }; }; }; 404: components["responses"]["not_found"]; @@ -15270,7 +15230,7 @@ export interface operations { "application/json": { message?: string; documentation_url?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -15520,7 +15480,7 @@ export interface operations { name: string; /** The description of the project. */ body?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -15689,7 +15649,7 @@ export interface operations { allow_rebase_merge?: boolean; /** Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. */ delete_branch_on_merge?: boolean; - } & { [key: string]: any }; + }; }; }; }; @@ -15866,7 +15826,7 @@ export interface operations { permission?: "pull" | "push" | "admin"; /** The ID of a team to set as the parent team. */ parent_team_id?: number; - } & { [key: string]: any }; + }; }; }; }; @@ -15959,7 +15919,7 @@ export interface operations { permission?: "pull" | "push" | "admin"; /** The ID of a team to set as the parent team. */ parent_team_id?: number | null; - } & { [key: string]: any }; + }; }; }; }; @@ -16026,7 +15986,7 @@ export interface operations { body: string; /** 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. */ private?: boolean; - } & { [key: string]: any }; + }; }; }; }; @@ -16101,7 +16061,7 @@ export interface operations { title?: string; /** The discussion post's body text. */ body?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -16166,7 +16126,7 @@ export interface operations { "application/json": { /** The discussion comment's body text. */ body: string; - } & { [key: string]: any }; + }; }; }; }; @@ -16242,7 +16202,7 @@ export interface operations { "application/json": { /** The discussion comment's body text. */ body: string; - } & { [key: string]: any }; + }; }; }; }; @@ -16307,7 +16267,7 @@ export interface operations { "application/json": { /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. */ content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - } & { [key: string]: any }; + }; }; }; }; @@ -16391,7 +16351,7 @@ export interface operations { "application/json": { /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. */ content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - } & { [key: string]: any }; + }; }; }; }; @@ -16545,12 +16505,12 @@ export interface operations { content: { "application/json": { message?: string; - errors?: ({ + errors?: { code?: string; field?: string; resource?: string; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; }; }; }; @@ -16563,7 +16523,7 @@ export interface operations { * \* `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. */ role?: "member" | "maintainer"; - } & { [key: string]: any }; + }; }; }; }; @@ -16669,24 +16629,22 @@ export interface operations { "application/json": { message?: string; documentation_url?: string; - } & { [key: string]: any }; + }; }; }; }; requestBody: { content: { - "application/json": - | ({ - /** - * 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)." - */ - permission?: "read" | "write" | "admin"; - } & { [key: string]: any }) - | null; + "application/json": { + /** + * 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)." + */ + permission?: "read" | "write" | "admin"; + } | null; }; }; }; @@ -16805,7 +16763,7 @@ export interface operations { * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. */ permission?: "pull" | "push" | "admin" | "maintain" | "triage"; - } & { [key: string]: any }; + }; }; }; }; @@ -16880,15 +16838,15 @@ export interface operations { content: { "application/json": { /** 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: ({ + groups: { /** ID of the IdP group. */ group_id: string; /** Name of the IdP group. */ group_name: string; /** Description of the IdP group. */ group_description: string; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; }; }; }; @@ -16960,7 +16918,7 @@ export interface operations { message?: string; documentation_url?: string; errors?: string[]; - } & { [key: string]: any }; + }; }; }; 404: components["responses"]["not_found"]; @@ -16993,7 +16951,7 @@ export interface operations { note?: string | null; /** Whether or not the card is archived */ archived?: boolean; - } & { [key: string]: any }; + }; }; }; }; @@ -17019,13 +16977,13 @@ export interface operations { "application/json": { message?: string; documentation_url?: string; - errors?: ({ + errors?: { code?: string; message?: string; resource?: string; field?: string; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; }; }; 422: components["responses"]["validation_failed"]; @@ -17036,11 +16994,11 @@ export interface operations { code?: string; message?: string; documentation_url?: string; - errors?: ({ + errors?: { code?: string; message?: string; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; }; }; }; @@ -17051,7 +17009,7 @@ export interface operations { position: string; /** The unique identifier of the column the card should be moved to */ column_id?: number; - } & { [key: string]: any }; + }; }; }; }; @@ -17113,7 +17071,7 @@ export interface operations { "application/json": { /** Name of the project column */ name: string; - } & { [key: string]: any }; + }; }; }; }; @@ -17170,10 +17128,9 @@ export interface operations { /** Validation Failed */ 422: { content: { - "application/json": ( + "application/json": | components["schemas"]["validation-error"] - | components["schemas"]["validation-error-simple"] - ) & { [key: string]: any }; + | components["schemas"]["validation-error-simple"]; }; }; /** Service Unavailable */ @@ -17183,28 +17140,27 @@ export interface operations { code?: string; message?: string; documentation_url?: string; - errors?: ({ + errors?: { code?: string; message?: string; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; }; }; }; requestBody: { content: { - "application/json": ( - | ({ + "application/json": + | { /** The project card's note */ note: string | null; - } & { [key: string]: any }) - | ({ + } + | { /** The unique identifier of the content associated with the card */ content_id: number; /** The piece of content associated with the card */ content_type: string; - } & { [key: string]: any }) - ) & { [key: string]: any }; + }; }; }; }; @@ -17232,7 +17188,7 @@ export interface operations { "application/json": { /** The position of the column in a project */ position: string; - } & { [key: string]: any }; + }; }; }; }; @@ -17274,7 +17230,7 @@ export interface operations { message?: string; documentation_url?: string; errors?: string[]; - } & { [key: string]: any }; + }; }; }; 404: components["responses"]["not_found"]; @@ -17304,7 +17260,7 @@ export interface operations { message?: string; documentation_url?: string; errors?: string[]; - } & { [key: string]: any }; + }; }; }; /** Response if the authenticated user does not have access to the project */ @@ -17325,7 +17281,7 @@ export interface operations { organization_permission?: "read" | "write" | "admin" | "none"; /** Whether or not this project can be seen by everyone. */ private?: boolean; - } & { [key: string]: any }; + }; }; }; }; @@ -17388,7 +17344,7 @@ export interface operations { "application/json": { /** The permission to grant the collaborator. */ permission?: "read" | "write" | "admin"; - } & { [key: string]: any }; + }; }; }; }; @@ -17482,7 +17438,7 @@ export interface operations { "application/json": { /** Name of the project column */ name: string; - } & { [key: string]: any }; + }; }; }; }; @@ -17572,7 +17528,7 @@ export interface operations { "application/json": { message?: string; documentation_url?: string; - } & { [key: string]: any }; + }; }; }; 404: components["responses"]["not_found"]; @@ -17633,7 +17589,7 @@ export interface operations { delete_branch_on_merge?: boolean; /** `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. */ archived?: boolean; - } & { [key: string]: any }; + }; }; }; }; @@ -17659,7 +17615,7 @@ export interface operations { "application/json": { total_count: number; artifacts: components["schemas"]["artifact"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -17803,7 +17759,7 @@ export interface operations { "application/json": { enabled: components["schemas"]["actions-enabled"]; allowed_actions?: components["schemas"]["allowed-actions"]; - } & { [key: string]: any }; + }; }; }; }; @@ -17876,7 +17832,7 @@ export interface operations { "application/json": { total_count: number; runners: components["schemas"]["runner"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -18036,7 +17992,7 @@ export interface operations { "application/json": { total_count: number; workflow_runs: components["schemas"]["workflow-run"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -18122,7 +18078,7 @@ export interface operations { "application/json": { total_count: number; artifacts: components["schemas"]["artifact"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -18172,7 +18128,7 @@ export interface operations { "application/json": { total_count: number; jobs: components["schemas"]["job"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -18266,7 +18222,7 @@ export interface operations { state: "approved" | "rejected"; /** A comment to accompany the deployment review */ comment: string; - } & { [key: string]: any }; + }; }; }; }; @@ -18330,7 +18286,7 @@ export interface operations { "application/json": { total_count: number; secrets: components["schemas"]["actions-secret"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -18470,7 +18426,7 @@ export interface operations { encrypted_value?: string; /** ID of the key you used to encrypt the secret. */ key_id?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -18511,7 +18467,7 @@ export interface operations { "application/json": { total_count: number; workflows: components["schemas"]["workflow"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -18581,7 +18537,7 @@ export interface operations { ref: string; /** 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 }; - } & { [key: string]: any }; + }; }; }; }; @@ -18640,7 +18596,7 @@ export interface operations { "application/json": { total_count: number; workflow_runs: components["schemas"]["workflow-run"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -18845,52 +18801,46 @@ export interface operations { content: { "application/json": { /** Require status checks to pass before merging. Set to `null` to disable. */ - required_status_checks: - | ({ - /** Require branches to be up to date before merging. */ - strict: boolean; - /** The list of status checks to require in order to merge into this branch */ - contexts: string[]; - } & { [key: string]: any }) - | null; + required_status_checks: { + /** Require branches to be up to date before merging. */ + strict: boolean; + /** The list of status checks to require in order to merge into this branch */ + contexts: string[]; + } | null; /** 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; /** Require at least one approving review on a pull request, before merging. Set to `null` to disable. */ - required_pull_request_reviews: - | ({ - /** 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?: { - /** The list of user `login`s with dismissal access */ - users?: string[]; - /** The list of team `slug`s with dismissal access */ - teams?: string[]; - } & { [key: string]: any }; - /** Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ - dismiss_stale_reviews?: boolean; - /** Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) review them. */ - require_code_owner_reviews?: boolean; - /** Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6. */ - required_approving_review_count?: number; - } & { [key: string]: any }) - | null; + required_pull_request_reviews: { + /** 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?: { + /** The list of user `login`s with dismissal access */ + users?: string[]; + /** The list of team `slug`s with dismissal access */ + teams?: string[]; + }; + /** Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean; + /** Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) review them. */ + require_code_owner_reviews?: boolean; + /** Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6. */ + required_approving_review_count?: number; + } | null; /** 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: - | ({ - /** The list of user `login`s with push access */ - users: string[]; - /** The list of team `slug`s with push access */ - teams: string[]; - /** The list of app `slug`s with push access */ - apps?: string[]; - } & { [key: string]: any }) - | null; + restrictions: { + /** The list of user `login`s with push access */ + users: string[]; + /** The list of team `slug`s with push access */ + teams: string[]; + /** The list of app `slug`s with push access */ + apps?: string[]; + } | null; /** 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://help.github.com/github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. */ required_linear_history?: boolean; /** 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://help.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." */ allow_force_pushes?: boolean | null; /** 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://help.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. */ allow_deletions?: boolean; - } & { [key: string]: any }; + }; }; }; }; @@ -19041,14 +18991,14 @@ export interface operations { users?: string[]; /** The list of team `slug`s with dismissal access */ teams?: string[]; - } & { [key: string]: any }; + }; /** Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ dismiss_stale_reviews?: boolean; /** Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) have reviewed. */ require_code_owner_reviews?: boolean; /** Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6. */ required_approving_review_count?: number; - } & { [key: string]: any }; + }; }; }; }; @@ -19188,7 +19138,7 @@ export interface operations { strict?: boolean; /** The list of status checks to require in order to merge into this branch */ contexts?: string[]; - } & { [key: string]: any }; + }; }; }; }; @@ -19237,7 +19187,7 @@ export interface operations { "application/json": { /** contexts parameter */ contexts: string[]; - } & { [key: string]: any }; + }; }; }; }; @@ -19267,7 +19217,7 @@ export interface operations { "application/json": { /** contexts parameter */ contexts: string[]; - } & { [key: string]: any }; + }; }; }; }; @@ -19296,7 +19246,7 @@ export interface operations { "application/json": { /** contexts parameter */ contexts: string[]; - } & { [key: string]: any }; + }; }; }; }; @@ -19401,7 +19351,7 @@ export interface operations { "application/json": { /** apps parameter */ apps: string[]; - } & { [key: string]: any }; + }; }; }; }; @@ -19437,7 +19387,7 @@ export interface operations { "application/json": { /** apps parameter */ apps: string[]; - } & { [key: string]: any }; + }; }; }; }; @@ -19473,7 +19423,7 @@ export interface operations { "application/json": { /** apps parameter */ apps: string[]; - } & { [key: string]: any }; + }; }; }; }; @@ -19533,7 +19483,7 @@ export interface operations { "application/json": { /** teams parameter */ teams: string[]; - } & { [key: string]: any }; + }; }; }; }; @@ -19569,7 +19519,7 @@ export interface operations { "application/json": { /** teams parameter */ teams: string[]; - } & { [key: string]: any }; + }; }; }; }; @@ -19605,7 +19555,7 @@ export interface operations { "application/json": { /** teams parameter */ teams: string[]; - } & { [key: string]: any }; + }; }; }; }; @@ -19665,7 +19615,7 @@ export interface operations { "application/json": { /** users parameter */ users: string[]; - } & { [key: string]: any }; + }; }; }; }; @@ -19701,7 +19651,7 @@ export interface operations { "application/json": { /** users parameter */ users: string[]; - } & { [key: string]: any }; + }; }; }; }; @@ -19737,7 +19687,7 @@ export interface operations { "application/json": { /** users parameter */ users: string[]; - } & { [key: string]: any }; + }; }; }; }; @@ -19783,7 +19733,7 @@ export interface operations { "application/json": { /** The new name of the branch. */ new_name: string; - } & { [key: string]: any }; + }; }; }; }; @@ -19857,7 +19807,7 @@ export interface operations { /** The details of the check run. This parameter supports Markdown. */ text?: string; /** 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://help.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?: ({ + annotations?: { /** The path of the file to add an annotation to. For example, `assets/css/main.css`. */ path: string; /** The start line of the annotation. */ @@ -19876,27 +19826,27 @@ export interface operations { title?: string; /** Details about this annotation. The maximum size is 64 KB. */ raw_details?: string; - } & { [key: string]: any })[]; + }[]; /** 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?: ({ + images?: { /** The alternative text for the image. */ alt: string; /** The full URL of the image. */ image_url: string; /** A short image description. */ caption?: string; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; /** 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)." 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?: ({ + actions?: { /** The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ label: string; /** A short explanation of what this action would do. The maximum size is 40 characters. */ description: string; /** A reference for the action on the integrator's system. The maximum size is 20 characters. */ identifier: string; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; }; }; }; @@ -19991,7 +19941,7 @@ export interface operations { /** Can contain Markdown. */ text?: string; /** 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://help.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?: ({ + annotations?: { /** The path of the file to add an annotation to. For example, `assets/css/main.css`. */ path: string; /** The start line of the annotation. */ @@ -20010,27 +19960,27 @@ export interface operations { title?: string; /** Details about this annotation. The maximum size is 64 KB. */ raw_details?: string; - } & { [key: string]: any })[]; + }[]; /** 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?: ({ + images?: { /** The alternative text for the image. */ alt: string; /** The full URL of the image. */ image_url: string; /** A short image description. */ caption?: string; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; /** 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?: ({ + actions?: { /** The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ label: string; /** A short explanation of what this action would do. The maximum size is 40 characters. */ description: string; /** A reference for the action on the integrator's system. The maximum size is 20 characters. */ identifier: string; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; }; }; }; @@ -20085,7 +20035,7 @@ export interface operations { "application/json": { /** The sha of the head commit. */ head_sha: string; - } & { [key: string]: any }; + }; }; }; }; @@ -20109,13 +20059,13 @@ export interface operations { content: { "application/json": { /** 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?: ({ + auto_trigger_checks?: { /** The `id` of the GitHub App. */ app_id: number; /** Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. */ setting: boolean; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; }; }; }; @@ -20176,7 +20126,7 @@ export interface operations { "application/json": { total_count: number; check_runs: components["schemas"]["check-run"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -20297,7 +20247,7 @@ export interface operations { "application/json": { state: components["schemas"]["code-scanning-alert-set-state"]; dismissed_reason?: components["schemas"]["code-scanning-alert-dismissed-reason"]; - } & { [key: string]: any }; + }; }; }; }; @@ -20571,7 +20521,7 @@ export interface operations { started_at?: string; /** 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; - } & { [key: string]: any }; + }; }; }; }; @@ -20700,7 +20650,7 @@ export interface operations { */ permission?: "pull" | "push" | "admin" | "maintain" | "triage"; permissions?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -20821,7 +20771,7 @@ export interface operations { "application/json": { /** The contents of the comment */ body: string; - } & { [key: string]: any }; + }; }; }; }; @@ -20886,7 +20836,7 @@ export interface operations { "application/json": { /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment. */ content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - } & { [key: string]: any }; + }; }; }; }; @@ -21066,7 +21016,7 @@ export interface operations { position?: number; /** **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ line?: number; - } & { [key: string]: any }; + }; }; }; }; @@ -21190,7 +21140,7 @@ export interface operations { "application/json": { total_count: number; check_runs: components["schemas"]["check-run"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -21227,7 +21177,7 @@ export interface operations { "application/json": { total_count: number; check_suites: components["schemas"]["check-suite"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -21459,12 +21409,11 @@ export interface operations { 200: { content: { "application/vnd.github.v3.object": components["schemas"]["content-tree"]; - "application/json": ( + "application/json": | components["schemas"]["content-directory"] | components["schemas"]["content-file"] | components["schemas"]["content-symlink"] - | components["schemas"]["content-submodule"] - ) & { [key: string]: any }; + | components["schemas"]["content-submodule"]; }; }; 302: components["responses"]["found"]; @@ -21517,7 +21466,7 @@ export interface operations { /** The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ email: string; date?: string; - } & { [key: string]: any }; + }; /** The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ author?: { /** The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ @@ -21525,8 +21474,8 @@ export interface operations { /** The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ email: string; date?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; }; }; }; @@ -21575,15 +21524,15 @@ export interface operations { name?: string; /** The email of the author (or committer) of the commit */ email?: string; - } & { [key: string]: any }; + }; /** object containing information about the author. */ author?: { /** The name of the author (or committer) of the commit */ name?: string; /** The email of the author (or committer) of the commit */ email?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; }; }; }; @@ -21719,7 +21668,7 @@ export interface operations { content: { "application/json": { message?: string; - } & { [key: string]: any }; + }; }; }; /** response */ @@ -21728,7 +21677,7 @@ export interface operations { "application/json": { message?: string; documentation_url?: string; - } & { [key: string]: any }; + }; }; }; 422: components["responses"]["validation_failed"]; @@ -21744,7 +21693,7 @@ export interface operations { auto_merge?: boolean; /** The [status](https://docs.github.com/rest/reference/repos#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[]; - payload?: ({ [key: string]: any } | string) & { [key: string]: any }; + payload?: { [key: string]: any } | string; /** Name for the target deployment environment (e.g., `production`, `staging`, `qa`). */ environment?: string; /** Short description of the deployment. */ @@ -21760,7 +21709,7 @@ export interface operations { */ production_environment?: boolean; created_at?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -21889,7 +21838,7 @@ export interface operations { * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://docs.github.com/rest/overview/api-previews#enhanced-deployments) custom media type. */ auto_inactive?: boolean; - } & { [key: string]: any }; + }; }; }; }; @@ -21946,7 +21895,7 @@ export interface operations { event_type: string; /** JSON payload with extra information about the webhook event that your action or worklow may use. */ client_payload?: { [key: string]: any }; - } & { [key: string]: any }; + }; }; }; }; @@ -21970,7 +21919,7 @@ export interface operations { /** The number of environments in this repository */ total_count?: number; environments?: components["schemas"]["environment"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -22031,13 +21980,13 @@ export interface operations { "application/json": { wait_timer?: components["schemas"]["wait-timer"]; /** 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?: ({ + reviewers?: { type?: components["schemas"]["deployment-reviewer-type"]; /** The id of the user or team who can review the deployment */ id?: number; - } & { [key: string]: any })[]; + }[]; deployment_branch_policy?: components["schemas"]["deployment_branch_policy"]; - } & { [key: string]: any }; + }; }; }; }; @@ -22133,7 +22082,7 @@ export interface operations { "application/json": { /** Optional parameter to specify the organization name if forking into an organization. */ organization?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -22166,7 +22115,7 @@ export interface operations { content: string; /** The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. */ encoding?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -22264,7 +22213,7 @@ export interface operations { email?: string; /** 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; - } & { [key: string]: any }; + }; /** 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?: { /** The name of the author (or committer) of the commit */ @@ -22273,10 +22222,10 @@ export interface operations { email?: string; /** 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; - } & { [key: string]: any }; + }; /** 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; - } & { [key: string]: any }; + }; }; }; }; @@ -22417,7 +22366,7 @@ export interface operations { /** The SHA1 value for this reference. */ sha: string; key?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -22461,7 +22410,7 @@ export interface operations { sha: string; /** 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. */ force?: boolean; - } & { [key: string]: any }; + }; }; }; }; @@ -22535,8 +22484,8 @@ export interface operations { email?: string; /** 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; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; }; }; }; @@ -22618,7 +22567,7 @@ export interface operations { content: { "application/json": { /** Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ - tree: ({ + tree: { /** The file referenced in the tree. */ path?: string; /** 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. */ @@ -22637,13 +22586,13 @@ export interface operations { * **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; - } & { [key: string]: any })[]; + }[]; /** * 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; - } & { [key: string]: any }; + }; }; }; }; @@ -22737,12 +22686,12 @@ export interface operations { insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; token?: string; digest?: string; - } & { [key: string]: any }; + }; /** Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. */ events?: string[]; /** Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. */ active?: boolean; - } & { [key: string]: any }; + }; }; }; }; @@ -22809,7 +22758,7 @@ export interface operations { insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; address?: string; room?: string; - } & { [key: string]: any }; + }; /** Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. */ events?: string[]; /** Determines a list of events to be added to the list of events that the Hook triggers for. */ @@ -22818,7 +22767,7 @@ export interface operations { remove_events?: string[]; /** Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. */ active?: boolean; - } & { [key: string]: any }; + }; }; }; }; @@ -22872,7 +22821,7 @@ export interface operations { content_type?: components["schemas"]["webhook-config-content-type"]; secret?: components["schemas"]["webhook-config-secret"]; insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; - } & { [key: string]: any }; + }; }; }; }; @@ -22997,7 +22946,7 @@ export interface operations { vcs_password?: string; /** For a tfvc import, the name of the project that is being imported. */ tfvc_project?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -23042,7 +22991,7 @@ export interface operations { vcs_password?: string; vcs?: string; tfvc_project?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -23099,7 +23048,7 @@ export interface operations { /** The new Git author name. */ name?: string; remote_id?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -23142,7 +23091,7 @@ export interface operations { "application/json": { /** 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). */ use_lfs: "opt_in" | "opt_out"; - } & { [key: string]: any }; + }; }; }; }; @@ -23285,7 +23234,7 @@ export interface operations { "application/json": { /** The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. */ permissions?: "read" | "write" | "maintain" | "triage" | "admin"; - } & { [key: string]: any }; + }; }; }; }; @@ -23373,25 +23322,25 @@ export interface operations { content: { "application/json": { /** The title of the issue. */ - title: (string | number) & { [key: string]: any }; + title: string | number; /** The contents of the issue. */ body?: string; /** 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; - milestone?: ((string | number) & { [key: string]: any }) | null; + milestone?: (string | number) | null; /** Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ */ - labels?: (( + labels?: ( | string - | ({ + | { id?: number; name?: string; description?: string | null; color?: string | null; - } & { [key: string]: any }) - ) & { [key: string]: any })[]; + } + )[]; /** 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[]; - } & { [key: string]: any }; + }; }; }; }; @@ -23483,7 +23432,7 @@ export interface operations { "application/json": { /** The contents of the comment. */ body: string; - } & { [key: string]: any }; + }; }; }; }; @@ -23548,7 +23497,7 @@ export interface operations { "application/json": { /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment. */ content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - } & { [key: string]: any }; + }; }; }; }; @@ -23679,27 +23628,27 @@ export interface operations { content: { "application/json": { /** The title of the issue. */ - title?: ((string | number) & { [key: string]: any }) | null; + title?: (string | number) | null; /** The contents of the issue. */ body?: string | null; /** Login for the user that this issue should be assigned to. **This field is deprecated.** */ assignee?: string | null; /** State of the issue. Either `open` or `closed`. */ state?: "open" | "closed"; - milestone?: ((string | number) & { [key: string]: any }) | null; + milestone?: (string | number) | null; /** 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?: (( + labels?: ( | string - | ({ + | { id?: number; name?: string; description?: string | null; color?: string | null; - } & { [key: string]: any }) - ) & { [key: string]: any })[]; + } + )[]; /** 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[]; - } & { [key: string]: any }; + }; }; }; }; @@ -23726,7 +23675,7 @@ export interface operations { "application/json": { /** 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[]; - } & { [key: string]: any }; + }; }; }; }; @@ -23753,7 +23702,7 @@ export interface operations { "application/json": { /** 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[]; - } & { [key: string]: any }; + }; }; }; }; @@ -23817,7 +23766,7 @@ export interface operations { "application/json": { /** The contents of the comment. */ body: string; - } & { [key: string]: any }; + }; }; }; }; @@ -23898,7 +23847,7 @@ export interface operations { "application/json": { /** The names of the labels to add to the issue. You can pass an empty array to remove all labels. **Note:** 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. */ labels?: string[]; - } & { [key: string]: any }; + }; }; }; }; @@ -23926,7 +23875,7 @@ export interface operations { "application/json": { /** The name of the label to add to the issue. Must contain at least one label. **Note:** 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. */ labels: string[]; - } & { [key: string]: any }; + }; }; }; }; @@ -23991,18 +23940,16 @@ export interface operations { }; requestBody: { content: { - "application/json": - | ({ - /** - * 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` - */ - lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; - } & { [key: string]: any }) - | null; + "application/json": { + /** + * 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` + */ + lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; + } | null; }; }; }; @@ -24079,7 +24026,7 @@ export interface operations { "application/json": { /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue. */ content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - } & { [key: string]: any }; + }; }; }; }; @@ -24187,7 +24134,7 @@ export interface operations { * 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://help.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://help.github.com/articles/permission-levels-for-a-user-account-repository/)." */ read_only?: boolean; - } & { [key: string]: any }; + }; }; }; }; @@ -24278,7 +24225,7 @@ export interface operations { color?: string; /** A short description of the label. */ description?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -24338,7 +24285,7 @@ export interface operations { color?: string; /** A short description of the label. */ description?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -24401,7 +24348,7 @@ export interface operations { "application/json": { message?: string; documentation_url?: string; - } & { [key: string]: any }; + }; }; }; /** Merge conflict response */ @@ -24410,7 +24357,7 @@ export interface operations { "application/json": { message?: string; documentation_url?: string; - } & { [key: string]: any }; + }; }; }; 422: components["responses"]["validation_failed"]; @@ -24424,7 +24371,7 @@ export interface operations { head: string; /** Commit message to use for the merge commit. If omitted, a default message will be used. */ commit_message?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -24489,7 +24436,7 @@ export interface operations { description?: string; /** 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; - } & { [key: string]: any }; + }; }; }; }; @@ -24555,7 +24502,7 @@ export interface operations { description?: string; /** 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; - } & { [key: string]: any }; + }; }; }; }; @@ -24633,7 +24580,7 @@ export interface operations { "application/json": { /** 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; - } & { [key: string]: any }; + }; }; }; }; @@ -24675,16 +24622,14 @@ export interface operations { cname?: string | null; /** 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: (Partial<"gh-pages" | "master" | "master /docs"> & - Partial< - { - /** The repository branch used to publish your site's source files. */ - branch: string; - /** The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. */ - path: "/" | "/docs"; - } & { [key: string]: any } - >) & { [key: string]: any }; - } & { [key: string]: any }; + source: Partial<"gh-pages" | "master" | "master /docs"> & + Partial<{ + /** The repository branch used to publish your site's source files. */ + branch: string; + /** The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. */ + path: "/" | "/docs"; + }>; + }; }; }; }; @@ -24716,8 +24661,8 @@ export interface operations { branch: string; /** The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` */ path?: "/" | "/docs"; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; }; }; }; @@ -24872,7 +24817,7 @@ export interface operations { name: string; /** The description of the project. */ body?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -24957,7 +24902,7 @@ export interface operations { /** Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ draft?: boolean; issue?: number; - } & { [key: string]: any }; + }; }; }; }; @@ -25050,7 +24995,7 @@ export interface operations { "application/json": { /** The text of the reply to the review comment. */ body: string; - } & { [key: string]: any }; + }; }; }; }; @@ -25115,7 +25060,7 @@ export interface operations { "application/json": { /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment. */ content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - } & { [key: string]: any }; + }; }; }; }; @@ -25212,7 +25157,7 @@ export interface operations { base?: string; /** Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ maintainer_can_modify?: boolean; - } & { [key: string]: any }; + }; }; }; }; @@ -25297,7 +25242,7 @@ export interface operations { /** **Required when using multi-line comments**. 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://help.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. */ start_side?: "LEFT" | "RIGHT" | "side"; in_reply_to?: number; - } & { [key: string]: any }; + }; }; }; }; @@ -25333,7 +25278,7 @@ export interface operations { "application/json": { /** The text of the review comment. */ body: string; - } & { [key: string]: any }; + }; }; }; }; @@ -25428,7 +25373,7 @@ export interface operations { "application/json": { message?: string; documentation_url?: string; - } & { [key: string]: any }; + }; }; }; /** Response if sha was provided and pull request head did not match */ @@ -25437,25 +25382,23 @@ export interface operations { "application/json": { message?: string; documentation_url?: string; - } & { [key: string]: any }; + }; }; }; 422: components["responses"]["validation_failed"]; }; requestBody: { content: { - "application/json": - | ({ - /** Title for the automatic commit message. */ - commit_title?: string; - /** Extra detail to append to automatic commit message. */ - commit_message?: string; - /** SHA that pull request head must match to allow merge. */ - sha?: string; - /** Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. */ - merge_method?: "merge" | "squash" | "rebase"; - } & { [key: string]: any }) - | null; + "application/json": { + /** Title for the automatic commit message. */ + commit_title?: string; + /** Extra detail to append to automatic commit message. */ + commit_message?: string; + /** SHA that pull request head must match to allow merge. */ + sha?: string; + /** Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. */ + merge_method?: "merge" | "squash" | "rebase"; + } | null; }; }; }; @@ -25510,7 +25453,7 @@ export interface operations { reviewers?: string[]; /** An array of team `slug`s that will be requested. */ team_reviewers?: string[]; - } & { [key: string]: any }; + }; }; }; }; @@ -25534,7 +25477,7 @@ export interface operations { reviewers: string[]; /** An array of team `slug`s that will be removed. */ team_reviewers?: string[]; - } & { [key: string]: any }; + }; }; }; }; @@ -25600,7 +25543,7 @@ export interface operations { /** 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. */ event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; /** Use the following table to specify the location, destination, and contents of the draft review comment. */ - comments?: ({ + comments?: { /** The relative path to the file that necessitates a review comment. */ path: string; /** 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. */ @@ -25611,8 +25554,8 @@ export interface operations { side?: string; start_line?: number; start_side?: string; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; }; }; }; @@ -25661,7 +25604,7 @@ export interface operations { "application/json": { /** The body text of the pull request review. */ body: string; - } & { [key: string]: any }; + }; }; }; }; @@ -25741,7 +25684,7 @@ export interface operations { /** The message for the pull request review dismissal */ message: string; event?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -25773,7 +25716,7 @@ export interface operations { body?: string; /** 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. */ event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; - } & { [key: string]: any }; + }; }; }; }; @@ -25793,7 +25736,7 @@ export interface operations { "application/json": { message?: string; url?: string; - } & { [key: string]: any }; + }; }; }; 403: components["responses"]["forbidden"]; @@ -25802,12 +25745,10 @@ export interface operations { }; requestBody: { content: { - "application/json": - | ({ - /** 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; - } & { [key: string]: any }) - | null; + "application/json": { + /** 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; }; }; }; @@ -25906,7 +25847,7 @@ export interface operations { draft?: boolean; /** `true` to identify the release as a prerelease. `false` to identify the release as a full release. */ prerelease?: boolean; - } & { [key: string]: any }; + }; }; }; }; @@ -25972,7 +25913,7 @@ export interface operations { /** An alternate short description of the asset. Used in place of the filename. */ label?: string; state?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -26085,7 +26026,7 @@ export interface operations { draft?: boolean; /** `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ prerelease?: boolean; - } & { [key: string]: any }; + }; }; }; }; @@ -26251,7 +26192,7 @@ export interface operations { "application/json": { state: components["schemas"]["secret-scanning-alert-state"]; resolution?: components["schemas"]["secret-scanning-alert-resolution"]; - } & { [key: string]: any }; + }; }; }; }; @@ -26434,7 +26375,7 @@ export interface operations { description?: string; /** A string label to differentiate this status from the status of other systems. This field is case-insensitive. */ context?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -26504,7 +26445,7 @@ export interface operations { subscribed?: boolean; /** Determines if all notifications should be blocked from this repository. */ ignored?: boolean; - } & { [key: string]: any }; + }; }; }; }; @@ -26627,7 +26568,7 @@ export interface operations { "application/json": { /** 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[]; - } & { [key: string]: any }; + }; }; }; }; @@ -26734,7 +26675,7 @@ export interface operations { new_owner: string; /** ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */ team_ids?: number[]; - } & { [key: string]: any }; + }; }; }; }; @@ -26839,7 +26780,7 @@ export interface operations { include_all_branches?: boolean; /** Either `true` to create a new private repository or `false` to create a new public one. */ private?: boolean; - } & { [key: string]: any }; + }; }; }; }; @@ -26892,7 +26833,7 @@ export interface operations { "application/json": { total_count: number; secrets: components["schemas"]["actions-secret"][]; - } & { [key: string]: any }; + }; }; }; }; @@ -27035,7 +26976,7 @@ export interface operations { encrypted_value?: string; /** ID of the key you used to encrypt the secret. */ key_id?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -27105,11 +27046,11 @@ export interface operations { schemas: string[]; /** The name of the SCIM group. This must match the GitHub organization that the group maps to. */ displayName: string; - members?: ({ + members?: { /** The SCIM user ID for a user. */ value: string; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; }; }; }; @@ -27161,11 +27102,11 @@ export interface operations { schemas: string[]; /** The name of the SCIM group. This must match the GitHub organization that the group maps to. */ displayName: string; - members?: ({ + members?: { /** The SCIM user ID for a user. */ value: string; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; }; }; }; @@ -27213,7 +27154,7 @@ export interface operations { schemas: string[]; /** Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ Operations: { [key: string]: any }[]; - } & { [key: string]: any }; + }; }; }; }; @@ -27293,21 +27234,21 @@ export interface operations { givenName: string; /** The last name of the user. */ familyName: string; - } & { [key: string]: any }; + }; /** List of user emails. */ - emails: ({ + emails: { /** The email address. */ value: string; /** The type of email address. */ type: string; /** Whether this email address is the primary address. */ primary: boolean; - } & { [key: string]: any })[]; + }[]; /** List of SCIM group IDs the user is a member of. */ - groups?: ({ + groups?: { value?: string; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; }; }; }; @@ -27368,21 +27309,21 @@ export interface operations { givenName: string; /** The last name of the user. */ familyName: string; - } & { [key: string]: any }; + }; /** List of user emails. */ - emails: ({ + emails: { /** The email address. */ value: string; /** The type of email address. */ type: string; /** Whether this email address is the primary address. */ primary: boolean; - } & { [key: string]: any })[]; + }[]; /** List of SCIM group IDs the user is a member of. */ - groups?: ({ + groups?: { value?: string; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; }; }; }; @@ -27445,7 +27386,7 @@ export interface operations { schemas: string[]; /** Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ Operations: { [key: string]: any }[]; - } & { [key: string]: any }; + }; }; }; }; @@ -27534,18 +27475,18 @@ export interface operations { givenName: string; familyName: string; formatted?: string; - } & { [key: string]: any }; + }; /** user emails */ - emails: ({ + emails: { value: string; primary?: boolean; type?: string; - } & { [key: string]: any })[]; + }[]; schemas?: string[]; externalId?: string; groups?: string[]; active?: boolean; - } & { [key: string]: any }; + }; }; }; }; @@ -27610,14 +27551,14 @@ export interface operations { givenName: string; familyName: string; formatted?: string; - } & { [key: string]: any }; + }; /** user emails */ - emails: ({ + emails: { type?: string; value: string; primary?: boolean; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; }; }; }; @@ -27686,25 +27627,24 @@ export interface operations { "application/json": { schemas?: string[]; /** Set of operations to be performed */ - Operations: ({ + Operations: { op: "add" | "remove" | "replace"; path?: string; - value?: ( - | ({ + value?: + | { active?: boolean | null; userName?: string | null; externalId?: string | null; givenName?: string | null; familyName?: string | null; - } & { [key: string]: any }) - | ({ + } + | { value?: string; primary?: boolean; - } & { [key: string]: any })[] - | string - ) & { [key: string]: any }; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[] + | string; + }[]; + }; }; }; }; @@ -27751,7 +27691,7 @@ export interface operations { total_count: number; incomplete_results: boolean; items: components["schemas"]["code-search-result-item"][]; - } & { [key: string]: any }; + }; }; }; 304: components["responses"]["not_modified"]; @@ -27793,7 +27733,7 @@ export interface operations { total_count: number; incomplete_results: boolean; items: components["schemas"]["commit-search-result-item"][]; - } & { [key: string]: any }; + }; }; }; 304: components["responses"]["not_modified"]; @@ -27848,7 +27788,7 @@ export interface operations { total_count: number; incomplete_results: boolean; items: components["schemas"]["issue-search-result-item"][]; - } & { [key: string]: any }; + }; }; }; 304: components["responses"]["not_modified"]; @@ -27889,7 +27829,7 @@ export interface operations { total_count: number; incomplete_results: boolean; items: components["schemas"]["label-search-result-item"][]; - } & { [key: string]: any }; + }; }; }; 304: components["responses"]["not_modified"]; @@ -27936,7 +27876,7 @@ export interface operations { total_count: number; incomplete_results: boolean; items: components["schemas"]["repo-search-result-item"][]; - } & { [key: string]: any }; + }; }; }; 304: components["responses"]["not_modified"]; @@ -27970,7 +27910,7 @@ export interface operations { total_count: number; incomplete_results: boolean; items: components["schemas"]["topic-search-result-item"][]; - } & { [key: string]: any }; + }; }; }; 304: components["responses"]["not_modified"]; @@ -28011,7 +27951,7 @@ export interface operations { total_count: number; incomplete_results: boolean; items: components["schemas"]["user-search-result-item"][]; - } & { [key: string]: any }; + }; }; }; 304: components["responses"]["not_modified"]; @@ -28105,7 +28045,7 @@ export interface operations { permission?: "pull" | "push" | "admin"; /** The ID of a team to set as the parent team. */ parent_team_id?: number | null; - } & { [key: string]: any }; + }; }; }; }; @@ -28168,7 +28108,7 @@ export interface operations { body: string; /** 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. */ private?: boolean; - } & { [key: string]: any }; + }; }; }; }; @@ -28237,7 +28177,7 @@ export interface operations { title?: string; /** The discussion post's body text. */ body?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -28298,7 +28238,7 @@ export interface operations { "application/json": { /** The discussion comment's body text. */ body: string; - } & { [key: string]: any }; + }; }; }; }; @@ -28368,7 +28308,7 @@ export interface operations { "application/json": { /** The discussion comment's body text. */ body: string; - } & { [key: string]: any }; + }; }; }; }; @@ -28429,7 +28369,7 @@ export interface operations { "application/json": { /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. */ content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - } & { [key: string]: any }; + }; }; }; }; @@ -28488,7 +28428,7 @@ export interface operations { "application/json": { /** The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. */ content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; - } & { [key: string]: any }; + }; }; }; }; @@ -28606,13 +28546,13 @@ export interface operations { content: { "application/json": { message?: string; - errors?: ({ + errors?: { code?: string; field?: string; resource?: string; - } & { [key: string]: any })[]; + }[]; documentation_url?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -28703,13 +28643,13 @@ export interface operations { content: { "application/json": { message?: string; - errors?: ({ + errors?: { code?: string; field?: string; resource?: string; - } & { [key: string]: any })[]; + }[]; documentation_url?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -28722,7 +28662,7 @@ export interface operations { * \* `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. */ role?: "member" | "maintainer"; - } & { [key: string]: any }; + }; }; }; }; @@ -28823,7 +28763,7 @@ export interface operations { "application/json": { message?: string; documentation_url?: string; - } & { [key: string]: any }; + }; }; }; 404: components["responses"]["not_found"]; @@ -28841,7 +28781,7 @@ export interface operations { * 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)." */ permission?: "read" | "write" | "admin"; - } & { [key: string]: any }; + }; }; }; }; @@ -28950,7 +28890,7 @@ export interface operations { * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. */ permission?: "pull" | "push" | "admin"; - } & { [key: string]: any }; + }; }; }; }; @@ -29023,7 +28963,7 @@ export interface operations { content: { "application/json": { /** 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: ({ + groups: { /** ID of the IdP group. */ group_id: string; /** Name of the IdP group. */ @@ -29033,9 +28973,9 @@ export interface operations { id?: string; name?: string; description?: string; - } & { [key: string]: any })[]; + }[]; synced_at?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -29076,9 +29016,7 @@ export interface operations { /** response */ 200: { content: { - "application/json": (components["schemas"]["private-user"] | components["schemas"]["public-user"]) & { - [key: string]: any; - }; + "application/json": components["schemas"]["private-user"] | components["schemas"]["public-user"]; }; }; 304: components["responses"]["not_modified"]; @@ -29121,7 +29059,7 @@ export interface operations { hireable?: boolean; /** The new short biography of the user. */ bio?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -29216,7 +29154,7 @@ export interface operations { email: string; /** Denotes whether an email is publically visible. */ visibility: "public" | "private"; - } & { [key: string]: any }; + }; }; }; }; @@ -29262,14 +29200,13 @@ export interface operations { }; requestBody: { content: { - "application/json": ( - | ({ + "application/json": + | { /** 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. */ emails: string[]; - } & { [key: string]: any }) + } | string[] - | string - ) & { [key: string]: any }; + | string; }; }; }; @@ -29287,14 +29224,13 @@ export interface operations { }; requestBody: { content: { - "application/json": ( - | ({ + "application/json": + | { /** Email addresses associated with the GitHub user account. */ emails: string[]; - } & { [key: string]: any }) + } | string[] - | string - ) & { [key: string]: any }; + | string; }; }; }; @@ -29445,7 +29381,7 @@ export interface operations { "application/json": { /** A GPG key in ASCII-armored format. */ armored_public_key: string; - } & { [key: string]: any }; + }; }; }; }; @@ -29514,7 +29450,7 @@ export interface operations { "application/json": { total_count: number; installations: components["schemas"]["installation"][]; - } & { [key: string]: any }; + }; }; }; 304: components["responses"]["not_modified"]; @@ -29554,7 +29490,7 @@ export interface operations { total_count: number; repository_selection?: string; repositories: components["schemas"]["repository"][]; - } & { [key: string]: any }; + }; }; }; 304: components["responses"]["not_modified"]; @@ -29734,7 +29670,7 @@ export interface operations { title?: string; /** The public SSH key to add to your GitHub account. */ key: string; - } & { [key: string]: any }; + }; }; }; }; @@ -29885,7 +29821,7 @@ export interface operations { "application/json": { /** The state that the membership should be in. Only `"active"` will be accepted. */ state: "active"; - } & { [key: string]: any }; + }; }; }; }; @@ -29937,7 +29873,7 @@ export interface operations { /** Exclude attributes from the API response to improve performance */ exclude?: "repositories"[]; repositories: string[]; - } & { [key: string]: any }; + }; }; }; }; @@ -30303,7 +30239,7 @@ export interface operations { name: string; /** Body of the project */ body?: string | null; - } & { [key: string]: any }; + }; }; }; }; @@ -30447,7 +30383,7 @@ export interface operations { has_downloads?: boolean; /** Whether this repository acts as a template that can be used to generate new repositories. */ is_template?: boolean; - } & { [key: string]: any }; + }; }; }; }; @@ -30685,9 +30621,7 @@ export interface operations { /** response */ 200: { content: { - "application/json": (components["schemas"]["private-user"] | components["schemas"]["public-user"]) & { - [key: string]: any; - }; + "application/json": components["schemas"]["private-user"] | components["schemas"]["public-user"]; }; }; 404: components["responses"]["not_found"]; diff --git a/tests/v3/expected/http.ts b/tests/v3/expected/http.ts index 135358b63..d133f154c 100644 --- a/tests/v3/expected/http.ts +++ b/tests/v3/expected/http.ts @@ -684,19 +684,19 @@ export interface components { location: components["schemas"]["Location"]; name: string; priority: number; - } & { [key: string]: any }; + }; Region: { id: components["schemas"]["ID"]; type: "region"; version: number; body: components["schemas"]["RegionBody"]; - } & { [key: string]: any }; + }; CreateRegion: { body: components["schemas"]["RegionBody"]; - } & { [key: string]: any }; + }; UpdateRegion: { name: string; - } & { [key: string]: any }; + }; ProviderBody: { owner_id?: components["schemas"]["OptionalFlexID"]; team_id?: components["schemas"]["OptionalID"]; @@ -705,7 +705,7 @@ export interface components { logo_url?: components["schemas"]["LogoURL"]; support_email?: string; documentation_url?: string; - } & { [key: string]: any }; + }; UpdateProviderBody: { owner_id?: components["schemas"]["OptionalFlexID"]; team_id?: components["schemas"]["OptionalID"]; @@ -714,24 +714,24 @@ export interface components { logo_url?: components["schemas"]["OptionalLogoURL"]; support_email?: string | null; documentation_url?: string | null; - } & { [key: string]: any }; + }; Provider: { id: components["schemas"]["ID"]; version: number; type: "provider"; body: components["schemas"]["ProviderBody"]; - } & { [key: string]: any }; + }; CreateProvider: { body: components["schemas"]["ProviderBody"]; - } & { [key: string]: any }; + }; UpdateProvider: { id: components["schemas"]["ID"]; body: components["schemas"]["UpdateProviderBody"]; - } & { [key: string]: any }; + }; UpdateProduct: { id: components["schemas"]["ID"]; body: components["schemas"]["UpdateProductBody"]; - } & { [key: string]: any }; + }; UpdateProductBody: { name?: components["schemas"]["Name"]; label?: components["schemas"]["Label"]; @@ -752,28 +752,26 @@ export interface components { */ terms_url?: string | null; feature_types?: components["schemas"]["FeatureType"][] | null; - integration?: - | ({ - provisioning?: components["schemas"]["ProductProvisioning"]; - base_url?: string | null; - sso_url?: string | null; - version?: "v1" | null; - features?: { - access_code?: boolean | null; - sso?: boolean | null; - plan_change?: boolean | null; - credential?: ("none" | "single" | "multiple" | "unknown") | null; - } & { [key: string]: any }; - } & { [key: string]: any }) - | null; + integration?: { + provisioning?: components["schemas"]["ProductProvisioning"]; + base_url?: string | null; + sso_url?: string | null; + version?: "v1" | null; + features?: { + access_code?: boolean | null; + sso?: boolean | null; + plan_change?: boolean | null; + credential?: ("none" | "single" | "multiple" | "unknown") | null; + }; + } | null; /** An array of platform ids to restrict this product for. */ platform_ids?: components["schemas"]["ID"][] | null; tags?: components["schemas"]["ProductTags"]; - } & { [key: string]: any }; + }; UpdatePlan: { id: components["schemas"]["ID"]; body: components["schemas"]["UpdatePlanBody"]; - } & { [key: string]: any }; + }; UpdatePlanBody: { name?: components["schemas"]["Name"]; label?: components["schemas"]["Label"]; @@ -793,7 +791,7 @@ export interface components { trial_days?: number | null; /** Dollar value in cents */ cost?: number | null; - } & { [key: string]: any }; + }; /** * A feature type represents the different aspects of a product that are * offered, these features can manifest differently depending on the plan. @@ -822,7 +820,7 @@ export interface components { */ measurable?: boolean; values?: components["schemas"]["FeatureValuesList"]; - } & { [key: string]: any }; + }; /** * A list of allowable values for the feature. * To define values for a boolean feature type, only `true` is required, @@ -861,33 +859,31 @@ export interface components { formula?: components["schemas"]["PriceFormula"]; /** Description explains how a feature is calculated to the user. */ description?: string; - } & { [key: string]: any }; + }; numeric_details?: components["schemas"]["FeatureNumericDetails"]; - } & { [key: string]: any }; + }; /** * Optional container for additional details relating to numeric features. * This is required if the feature is measurable and numeric. */ - FeatureNumericDetails: - | ({ - /** - * 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; - /** Minimum value that can be set by a user if customizable */ - min?: number; - /** Maximum value that can be set by a user if customizable */ - max?: number | null; - /** Applied to the end of the number for display, for example the ‘GB’ in ‘20 GB’. */ - suffix?: string | null; - cost_ranges?: components["schemas"]["FeatureNumericRange"][] | null; - } & { [key: string]: any }) - | null; + FeatureNumericDetails: { + /** + * 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; + /** Minimum value that can be set by a user if customizable */ + min?: number; + /** Maximum value that can be set by a user if customizable */ + max?: number | null; + /** Applied to the end of the number for display, for example the ‘GB’ in ‘20 GB’. */ + suffix?: string | null; + cost_ranges?: components["schemas"]["FeatureNumericRange"][] | null; + } | null; FeatureNumericRange: { /** * Defines the end of the range ( inclusive ), from the previous, or 0; @@ -901,17 +897,17 @@ export interface components { * numeric value set in the feature to determine the cost. */ cost_multiple?: number; - } & { [key: string]: any }; + }; FeatureValue: { feature: components["schemas"]["Label"]; value: components["schemas"]["FeatureValueLabel"]; - } & { [key: string]: any }; + }; ValueProp: { /** Heading of a value proposition. */ header: string; /** Body of a value proposition. */ body: string; - } & { [key: string]: any }; + }; /** * Image URL used for Product listings. * @@ -960,8 +956,8 @@ export interface components { * product, it is just used to inform consumers through our clients. */ featured?: boolean; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** * 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. @@ -1001,7 +997,7 @@ export interface components { * * `unknown`: The credential type is unknown. */ credential?: "none" | "single" | "multiple" | "unknown"; - } & { [key: string]: any }; + }; ProductBody: { provider_id: components["schemas"]["ID"]; label: components["schemas"]["Label"]; @@ -1025,30 +1021,30 @@ export interface components { terms: { url?: string | null; provided: boolean; - } & { [key: string]: any }; + }; feature_types: components["schemas"]["FeatureType"][]; billing: { type: "monthly-prorated" | "monthly-anniversary" | "annual-anniversary"; currency: "usd"; - } & { [key: string]: any }; + }; integration: { provisioning: components["schemas"]["ProductProvisioning"]; base_url: string; sso_url?: string | null; version: "v1"; features: components["schemas"]["ProductIntegrationFeatures"]; - } & { [key: string]: any }; + }; tags?: components["schemas"]["ProductTags"]; - } & { [key: string]: any }; + }; Product: { id: components["schemas"]["ID"]; version: number; type: "product"; body: components["schemas"]["ProductBody"]; - } & { [key: string]: any }; + }; CreateProduct: { body: components["schemas"]["ProductBody"]; - } & { [key: string]: any }; + }; /** Array of Plan IDs that this Plan can be resized to, if null all will be assumed */ PlanResizeList: components["schemas"]["ID"][] | null; PlanBody: { @@ -1070,47 +1066,45 @@ export interface components { trial_days?: number; /** Dollar value in cents. */ cost: number; - } & { [key: string]: any }; + }; PlanState: "hidden" | "available" | "grandfathered" | "unlisted"; - ExpandedPlanBody: components["schemas"]["PlanBody"] & - ({ - /** An array of feature definitions for the plan, as defined on the Product. */ - expanded_features: components["schemas"]["ExpandedFeature"][]; - /** A boolean flag that indicates if a plan is free or not based on it's cost and features. */ - free: boolean; - /** Plan cost using its default features plus base cost. */ - defaultCost?: number; - /** A boolean flag that indicates if a plan has customizable features. */ - customizable?: boolean; - } & { [key: string]: any }) & { [key: string]: any }; - ExpandedFeature: components["schemas"]["FeatureType"] & - ({ - /** The string value set for the feature on the plan, this should only be used if the value property is null. */ - value_string: string; - value: components["schemas"]["FeatureValueDetails"]; - } & { [key: string]: any }) & { [key: string]: any }; + ExpandedPlanBody: components["schemas"]["PlanBody"] & { + /** An array of feature definitions for the plan, as defined on the Product. */ + expanded_features: components["schemas"]["ExpandedFeature"][]; + /** A boolean flag that indicates if a plan is free or not based on it's cost and features. */ + free: boolean; + /** Plan cost using its default features plus base cost. */ + defaultCost?: number; + /** A boolean flag that indicates if a plan has customizable features. */ + customizable?: boolean; + }; + ExpandedFeature: components["schemas"]["FeatureType"] & { + /** The string value set for the feature on the plan, this should only be used if the value property is null. */ + value_string: string; + value: components["schemas"]["FeatureValueDetails"]; + }; Plan: { id: components["schemas"]["ID"]; version: number; type: "plan"; body: components["schemas"]["PlanBody"]; - } & { [key: string]: any }; + }; ExpandedPlan: { id: components["schemas"]["ID"]; version: number; type: "plan"; body: components["schemas"]["ExpandedPlanBody"]; - } & { [key: string]: any }; + }; CreatePlan: { body: components["schemas"]["PlanBody"]; - } & { [key: string]: any }; + }; /** Unexpected error */ Error: { /** The error type */ type: string; /** Explanation of the errors */ message: string[]; - } & { [key: string]: any }; + }; /** * Describes how a feature cost should be calculated. An empty * string defaults to the normal price calculation using the value cost. @@ -1142,7 +1136,7 @@ export interface components { body: components["schemas"]["ProductBody"]; plans?: components["schemas"]["ExpandedPlan"][]; provider: components["schemas"]["Provider"]; - } & { [key: string]: any }; + }; }; parameters: { /** Filter results to only include those that have this label. */ diff --git a/tests/v3/expected/manifold.additional.ts b/tests/v3/expected/manifold.additional.ts new file mode 100644 index 000000000..135358b63 --- /dev/null +++ b/tests/v3/expected/manifold.additional.ts @@ -0,0 +1,1153 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + "/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"]; + }; + }; + }; + }; + "/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"]; + }; + }; + }; + }; + "/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"]; + }; + }; + }; + }; + "/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"]; + }; + }; + }; + }; + }; + "/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"]; + }; + }; + }; + }; + "/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"]; + }; + }; + }; + }; + "/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"]; + }; + }; + }; + }; +} + +export interface components { + schemas: { + /** A base32 encoded 18 byte identifier. */ + ID: string; + /** A base32 encoded 18 byte identifier. */ + OptionalID: string | null; + /** A flexible identifier for internal or external entities. */ + FlexID: string; + /** A flexible identifier for internal or external entities. */ + OptionalFlexID: string | null; + /** A machine readable unique label, which is url safe. */ + Label: string; + /** A machine readable unique label, which is url safe. */ + OptionalLabel: string | null; + /** A machine readable unique label, which is url safe. */ + FeatureValueLabel: string; + /** A location of where a potential resource can be provisioned. */ + Location: string; + /** A name of a platform which is used to provision resources. */ + Platform: string; + /** A name of an entity which is displayed to a human. */ + Name: string; + /** A name of an entity which is displayed to a human. */ + OptionalName: string | null; + /** + * Logo used for Provider and Product listings. + * + * Must be square (same width and height) and minimum 400px. Maximum of 800px. + */ + LogoURL: string; + /** + * Logo used for Provider and Product listings. + * + * Must be square (same width and height) and minimum 400px. Maximum of 800px. + */ + OptionalLogoURL: string | null; + RegionBody: { + platform: components["schemas"]["Platform"]; + location: components["schemas"]["Location"]; + name: string; + priority: number; + } & { [key: string]: any }; + Region: { + id: components["schemas"]["ID"]; + type: "region"; + version: number; + body: components["schemas"]["RegionBody"]; + } & { [key: string]: any }; + CreateRegion: { + body: components["schemas"]["RegionBody"]; + } & { [key: string]: any }; + UpdateRegion: { + name: string; + } & { [key: string]: any }; + ProviderBody: { + owner_id?: components["schemas"]["OptionalFlexID"]; + team_id?: components["schemas"]["OptionalID"]; + label: components["schemas"]["Label"]; + name: components["schemas"]["Name"]; + logo_url?: components["schemas"]["LogoURL"]; + support_email?: string; + documentation_url?: string; + } & { [key: string]: any }; + UpdateProviderBody: { + owner_id?: components["schemas"]["OptionalFlexID"]; + team_id?: components["schemas"]["OptionalID"]; + label?: components["schemas"]["OptionalLabel"]; + name?: components["schemas"]["OptionalName"]; + logo_url?: components["schemas"]["OptionalLogoURL"]; + support_email?: string | null; + documentation_url?: string | null; + } & { [key: string]: any }; + Provider: { + id: components["schemas"]["ID"]; + version: number; + type: "provider"; + body: components["schemas"]["ProviderBody"]; + } & { [key: string]: any }; + CreateProvider: { + body: components["schemas"]["ProviderBody"]; + } & { [key: string]: any }; + UpdateProvider: { + id: components["schemas"]["ID"]; + body: components["schemas"]["UpdateProviderBody"]; + } & { [key: string]: any }; + UpdateProduct: { + id: components["schemas"]["ID"]; + body: components["schemas"]["UpdateProductBody"]; + } & { [key: string]: any }; + UpdateProductBody: { + name?: components["schemas"]["Name"]; + label?: components["schemas"]["Label"]; + logo_url?: components["schemas"]["LogoURL"]; + listing?: components["schemas"]["ProductListing"]; + /** 140 character sentence positioning the product. */ + tagline?: string | null; + /** A list of value propositions of the product. */ + value_props?: components["schemas"]["ValueProp"][] | null; + /** A list of getting started steps for the product */ + setup_steps?: string[] | null; + images?: components["schemas"]["ProductImageURL"][] | null; + support_email?: string | null; + documentation_url?: string | null; + /** + * 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; + feature_types?: components["schemas"]["FeatureType"][] | null; + integration?: + | ({ + provisioning?: components["schemas"]["ProductProvisioning"]; + base_url?: string | null; + sso_url?: string | null; + version?: "v1" | null; + features?: { + access_code?: boolean | null; + sso?: boolean | null; + plan_change?: boolean | null; + credential?: ("none" | "single" | "multiple" | "unknown") | null; + } & { [key: string]: any }; + } & { [key: string]: any }) + | null; + /** An array of platform ids to restrict this product for. */ + platform_ids?: components["schemas"]["ID"][] | null; + tags?: components["schemas"]["ProductTags"]; + } & { [key: string]: any }; + UpdatePlan: { + id: components["schemas"]["ID"]; + body: components["schemas"]["UpdatePlanBody"]; + } & { [key: string]: any }; + UpdatePlanBody: { + name?: components["schemas"]["Name"]; + label?: components["schemas"]["Label"]; + state?: components["schemas"]["PlanState"]; + /** Used in conjuction with resizable_to to set or unset the list */ + has_resize_constraints?: boolean | null; + resizable_to?: components["schemas"]["PlanResizeList"]; + /** Array of Region IDs */ + regions?: components["schemas"]["ID"][] | null; + /** Array of Feature Values */ + features?: components["schemas"]["FeatureValue"][] | null; + /** + * 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; + /** Dollar value in cents */ + cost?: number | null; + } & { [key: string]: any }; + /** + * A feature type represents the different aspects of a product that are + * offered, these features can manifest differently depending on the plan. + */ + FeatureType: { + label: components["schemas"]["Label"]; + name: components["schemas"]["Name"]; + type: "boolean" | "string" | "number"; + /** This sets whether or not the feature can be customized by a consumer. */ + customizable?: boolean; + /** + * 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. + */ + upgradable?: boolean; + /** + * 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. + */ + downgradable?: boolean; + /** + * Sets if this feature’s value is trackable from the provider, + * this only really affects numeric constraints. + */ + measurable?: boolean; + values?: components["schemas"]["FeatureValuesList"]; + } & { [key: string]: any }; + /** + * 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; + FeatureValueDetails: { + label: components["schemas"]["FeatureValueLabel"]; + name: components["schemas"]["Name"]; + /** + * 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; + /** + * Price describes the cost of a feature. It should be preferred over + * the `cost` property. + */ + price?: { + /** + * 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; + /** + * 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; + formula?: components["schemas"]["PriceFormula"]; + /** Description explains how a feature is calculated to the user. */ + description?: string; + } & { [key: string]: any }; + numeric_details?: components["schemas"]["FeatureNumericDetails"]; + } & { [key: string]: any }; + /** + * Optional container for additional details relating to numeric features. + * This is required if the feature is measurable and numeric. + */ + FeatureNumericDetails: + | ({ + /** + * 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; + /** Minimum value that can be set by a user if customizable */ + min?: number; + /** Maximum value that can be set by a user if customizable */ + max?: number | null; + /** Applied to the end of the number for display, for example the ‘GB’ in ‘20 GB’. */ + suffix?: string | null; + cost_ranges?: components["schemas"]["FeatureNumericRange"][] | null; + } & { [key: string]: any }) + | null; + FeatureNumericRange: { + /** + * 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; + /** + * 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; + } & { [key: string]: any }; + FeatureValue: { + feature: components["schemas"]["Label"]; + value: components["schemas"]["FeatureValueLabel"]; + } & { [key: string]: any }; + ValueProp: { + /** Heading of a value proposition. */ + header: string; + /** Body of a value proposition. */ + body: string; + } & { [key: string]: any }; + /** + * Image URL used for Product listings. + * + * Minimum 660px wide, 400px high. + */ + ProductImageURL: string; + /** List of tags for product categorization and search */ + ProductTags: components["schemas"]["Label"][]; + ProductState: "available" | "hidden" | "grandfathered" | "new" | "upcoming"; + ProductListing: { + /** + * When true, everyone can see the product when requested. When false it will + * not be visible to anyone except those on the provider team. + */ + public?: boolean; + /** + * 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. + */ + listed?: boolean; + /** + * 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?: { + /** + * 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. + */ + beta?: boolean; + /** + * 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. + */ + new?: boolean; + /** + * 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. + */ + featured?: boolean; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** + * 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. + */ + ProductProvisioning: "provider-only" | "pre-order" | "public"; + ProductIntegrationFeatures: { + /** + * Indicates whether or not this product supports resource transitions to + * manifold by access_code. + */ + access_code?: boolean; + /** + * Represents whether or not this product supports Single + * Sign On + */ + sso?: boolean; + /** + * Represents whether or not this product supports changing + * the plan of a resource. + */ + plan_change?: boolean; + /** + * Describes how the region for a resource is specified, if + * unspecified, then regions have no impact on this + * resource. + */ + region?: "user-specified" | "unspecified"; + /** + * 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. + */ + credential?: "none" | "single" | "multiple" | "unknown"; + } & { [key: string]: any }; + ProductBody: { + provider_id: components["schemas"]["ID"]; + label: components["schemas"]["Label"]; + name: components["schemas"]["Name"]; + state: components["schemas"]["ProductState"]; + listing: components["schemas"]["ProductListing"]; + logo_url: components["schemas"]["LogoURL"]; + /** 140 character sentence positioning the product. */ + tagline: string; + /** A list of value propositions of the product. */ + value_props: components["schemas"]["ValueProp"][]; + /** A list of getting started steps for the product */ + setup_steps?: string[] | null; + images: components["schemas"]["ProductImageURL"][]; + support_email: string; + documentation_url: string; + /** + * 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; + provided: boolean; + } & { [key: string]: any }; + feature_types: components["schemas"]["FeatureType"][]; + billing: { + type: "monthly-prorated" | "monthly-anniversary" | "annual-anniversary"; + currency: "usd"; + } & { [key: string]: any }; + integration: { + provisioning: components["schemas"]["ProductProvisioning"]; + base_url: string; + sso_url?: string | null; + version: "v1"; + features: components["schemas"]["ProductIntegrationFeatures"]; + } & { [key: string]: any }; + tags?: components["schemas"]["ProductTags"]; + } & { [key: string]: any }; + Product: { + id: components["schemas"]["ID"]; + version: number; + type: "product"; + body: components["schemas"]["ProductBody"]; + } & { [key: string]: any }; + CreateProduct: { + body: components["schemas"]["ProductBody"]; + } & { [key: string]: any }; + /** Array of Plan IDs that this Plan can be resized to, if null all will be assumed */ + PlanResizeList: components["schemas"]["ID"][] | null; + PlanBody: { + provider_id: components["schemas"]["ID"]; + product_id: components["schemas"]["ID"]; + name: components["schemas"]["Name"]; + label: components["schemas"]["Label"]; + state: components["schemas"]["PlanState"]; + resizable_to?: components["schemas"]["PlanResizeList"]; + /** Array of Region IDs */ + regions: components["schemas"]["ID"][]; + /** Array of Feature Values */ + features: components["schemas"]["FeatureValue"][]; + /** + * 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; + /** Dollar value in cents. */ + cost: number; + } & { [key: string]: any }; + PlanState: "hidden" | "available" | "grandfathered" | "unlisted"; + ExpandedPlanBody: components["schemas"]["PlanBody"] & + ({ + /** An array of feature definitions for the plan, as defined on the Product. */ + expanded_features: components["schemas"]["ExpandedFeature"][]; + /** A boolean flag that indicates if a plan is free or not based on it's cost and features. */ + free: boolean; + /** Plan cost using its default features plus base cost. */ + defaultCost?: number; + /** A boolean flag that indicates if a plan has customizable features. */ + customizable?: boolean; + } & { [key: string]: any }) & { [key: string]: any }; + ExpandedFeature: components["schemas"]["FeatureType"] & + ({ + /** The string value set for the feature on the plan, this should only be used if the value property is null. */ + value_string: string; + value: components["schemas"]["FeatureValueDetails"]; + } & { [key: string]: any }) & { [key: string]: any }; + Plan: { + id: components["schemas"]["ID"]; + version: number; + type: "plan"; + body: components["schemas"]["PlanBody"]; + } & { [key: string]: any }; + ExpandedPlan: { + id: components["schemas"]["ID"]; + version: number; + type: "plan"; + body: components["schemas"]["ExpandedPlanBody"]; + } & { [key: string]: any }; + CreatePlan: { + body: components["schemas"]["PlanBody"]; + } & { [key: string]: any }; + /** Unexpected error */ + Error: { + /** The error type */ + type: string; + /** Explanation of the errors */ + message: string[]; + } & { [key: string]: any }; + /** + * 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; + ExpandedProduct: { + id: components["schemas"]["ID"]; + version: number; + type: "product"; + body: components["schemas"]["ProductBody"]; + plans?: components["schemas"]["ExpandedPlan"][]; + provider: components["schemas"]["Provider"]; + } & { [key: string]: any }; + }; + parameters: { + /** Filter results to only include those that have this label. */ + LabelFilter: string; + }; +} + +export interface operations {} diff --git a/tests/v3/expected/manifold.immutable.ts b/tests/v3/expected/manifold.immutable.ts index 66fa7cfd2..f4a54add4 100644 --- a/tests/v3/expected/manifold.immutable.ts +++ b/tests/v3/expected/manifold.immutable.ts @@ -684,19 +684,19 @@ export interface components { readonly location: components["schemas"]["Location"]; readonly name: string; readonly priority: number; - } & { readonly [key: string]: any }; + }; readonly Region: { readonly id: components["schemas"]["ID"]; readonly type: "region"; readonly version: number; readonly body: components["schemas"]["RegionBody"]; - } & { readonly [key: string]: any }; + }; readonly CreateRegion: { readonly body: components["schemas"]["RegionBody"]; - } & { readonly [key: string]: any }; + }; readonly UpdateRegion: { readonly name: string; - } & { readonly [key: string]: any }; + }; readonly ProviderBody: { readonly owner_id?: components["schemas"]["OptionalFlexID"]; readonly team_id?: components["schemas"]["OptionalID"]; @@ -705,7 +705,7 @@ export interface components { readonly logo_url?: components["schemas"]["LogoURL"]; readonly support_email?: string; readonly documentation_url?: string; - } & { readonly [key: string]: any }; + }; readonly UpdateProviderBody: { readonly owner_id?: components["schemas"]["OptionalFlexID"]; readonly team_id?: components["schemas"]["OptionalID"]; @@ -714,24 +714,24 @@ export interface components { readonly logo_url?: components["schemas"]["OptionalLogoURL"]; readonly support_email?: string | null; readonly documentation_url?: string | null; - } & { readonly [key: string]: any }; + }; readonly Provider: { readonly id: components["schemas"]["ID"]; readonly version: number; readonly type: "provider"; readonly body: components["schemas"]["ProviderBody"]; - } & { readonly [key: string]: any }; + }; readonly CreateProvider: { readonly body: components["schemas"]["ProviderBody"]; - } & { readonly [key: string]: any }; + }; readonly UpdateProvider: { readonly id: components["schemas"]["ID"]; readonly body: components["schemas"]["UpdateProviderBody"]; - } & { readonly [key: string]: any }; + }; readonly UpdateProduct: { readonly id: components["schemas"]["ID"]; readonly body: components["schemas"]["UpdateProductBody"]; - } & { readonly [key: string]: any }; + }; readonly UpdateProductBody: { readonly name?: components["schemas"]["Name"]; readonly label?: components["schemas"]["Label"]; @@ -752,28 +752,26 @@ export interface components { */ readonly terms_url?: string | null; readonly feature_types?: readonly components["schemas"]["FeatureType"][] | null; - readonly integration?: - | ({ - readonly provisioning?: components["schemas"]["ProductProvisioning"]; - readonly base_url?: string | null; - readonly sso_url?: string | null; - readonly version?: "v1" | null; - readonly features?: { - readonly access_code?: boolean | null; - readonly sso?: boolean | null; - readonly plan_change?: boolean | null; - readonly credential?: ("none" | "single" | "multiple" | "unknown") | null; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }) - | null; + readonly integration?: { + readonly provisioning?: components["schemas"]["ProductProvisioning"]; + readonly base_url?: string | null; + readonly sso_url?: string | null; + readonly version?: "v1" | null; + readonly features?: { + readonly access_code?: boolean | null; + readonly sso?: boolean | null; + readonly plan_change?: boolean | null; + readonly credential?: ("none" | "single" | "multiple" | "unknown") | null; + }; + } | null; /** An array of platform ids to restrict this product for. */ readonly platform_ids?: readonly components["schemas"]["ID"][] | null; readonly tags?: components["schemas"]["ProductTags"]; - } & { readonly [key: string]: any }; + }; readonly UpdatePlan: { readonly id: components["schemas"]["ID"]; readonly body: components["schemas"]["UpdatePlanBody"]; - } & { readonly [key: string]: any }; + }; readonly UpdatePlanBody: { readonly name?: components["schemas"]["Name"]; readonly label?: components["schemas"]["Label"]; @@ -793,7 +791,7 @@ export interface components { readonly trial_days?: number | null; /** Dollar value in cents */ readonly cost?: number | null; - } & { readonly [key: string]: any }; + }; /** * A feature type represents the different aspects of a product that are * offered, these features can manifest differently depending on the plan. @@ -822,7 +820,7 @@ export interface components { */ readonly measurable?: boolean; readonly values?: components["schemas"]["FeatureValuesList"]; - } & { readonly [key: string]: any }; + }; /** * A list of allowable values for the feature. * To define values for a boolean feature type, only `true` is required, @@ -861,33 +859,31 @@ export interface components { readonly formula?: components["schemas"]["PriceFormula"]; /** Description explains how a feature is calculated to the user. */ readonly description?: string; - } & { readonly [key: string]: any }; + }; readonly numeric_details?: components["schemas"]["FeatureNumericDetails"]; - } & { readonly [key: string]: any }; + }; /** * Optional container for additional details relating to numeric features. * This is required if the feature is measurable and numeric. */ - readonly FeatureNumericDetails: - | ({ - /** - * 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. - */ - readonly increment?: number; - /** Minimum value that can be set by a user if customizable */ - readonly min?: number; - /** Maximum value that can be set by a user if customizable */ - readonly max?: number | null; - /** Applied to the end of the number for display, for example the ‘GB’ in ‘20 GB’. */ - readonly suffix?: string | null; - readonly cost_ranges?: readonly components["schemas"]["FeatureNumericRange"][] | null; - } & { readonly [key: string]: any }) - | null; + readonly FeatureNumericDetails: { + /** + * 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. + */ + readonly increment?: number; + /** Minimum value that can be set by a user if customizable */ + readonly min?: number; + /** Maximum value that can be set by a user if customizable */ + readonly max?: number | null; + /** Applied to the end of the number for display, for example the ‘GB’ in ‘20 GB’. */ + readonly suffix?: string | null; + readonly cost_ranges?: readonly components["schemas"]["FeatureNumericRange"][] | null; + } | null; readonly FeatureNumericRange: { /** * Defines the end of the range ( inclusive ), from the previous, or 0; @@ -901,17 +897,17 @@ export interface components { * numeric value set in the feature to determine the cost. */ readonly cost_multiple?: number; - } & { readonly [key: string]: any }; + }; readonly FeatureValue: { readonly feature: components["schemas"]["Label"]; readonly value: components["schemas"]["FeatureValueLabel"]; - } & { readonly [key: string]: any }; + }; readonly ValueProp: { /** Heading of a value proposition. */ readonly header: string; /** Body of a value proposition. */ readonly body: string; - } & { readonly [key: string]: any }; + }; /** * Image URL used for Product listings. * @@ -960,8 +956,8 @@ export interface components { * product, it is just used to inform consumers through our clients. */ readonly featured?: boolean; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** * 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. @@ -1001,7 +997,7 @@ export interface components { * * `unknown`: The credential type is unknown. */ readonly credential?: "none" | "single" | "multiple" | "unknown"; - } & { readonly [key: string]: any }; + }; readonly ProductBody: { readonly provider_id: components["schemas"]["ID"]; readonly label: components["schemas"]["Label"]; @@ -1025,30 +1021,30 @@ export interface components { readonly terms: { readonly url?: string | null; readonly provided: boolean; - } & { readonly [key: string]: any }; + }; readonly feature_types: readonly components["schemas"]["FeatureType"][]; readonly billing: { readonly type: "monthly-prorated" | "monthly-anniversary" | "annual-anniversary"; readonly currency: "usd"; - } & { readonly [key: string]: any }; + }; readonly integration: { readonly provisioning: components["schemas"]["ProductProvisioning"]; readonly base_url: string; readonly sso_url?: string | null; readonly version: "v1"; readonly features: components["schemas"]["ProductIntegrationFeatures"]; - } & { readonly [key: string]: any }; + }; readonly tags?: components["schemas"]["ProductTags"]; - } & { readonly [key: string]: any }; + }; readonly Product: { readonly id: components["schemas"]["ID"]; readonly version: number; readonly type: "product"; readonly body: components["schemas"]["ProductBody"]; - } & { readonly [key: string]: any }; + }; readonly CreateProduct: { readonly body: components["schemas"]["ProductBody"]; - } & { readonly [key: string]: any }; + }; /** Array of Plan IDs that this Plan can be resized to, if null all will be assumed */ readonly PlanResizeList: readonly components["schemas"]["ID"][] | null; readonly PlanBody: { @@ -1070,47 +1066,45 @@ export interface components { readonly trial_days?: number; /** Dollar value in cents. */ readonly cost: number; - } & { readonly [key: string]: any }; + }; readonly PlanState: "hidden" | "available" | "grandfathered" | "unlisted"; - readonly ExpandedPlanBody: components["schemas"]["PlanBody"] & - ({ - /** An array of feature definitions for the plan, as defined on the Product. */ - readonly expanded_features: readonly components["schemas"]["ExpandedFeature"][]; - /** A boolean flag that indicates if a plan is free or not based on it's cost and features. */ - readonly free: boolean; - /** Plan cost using its default features plus base cost. */ - readonly defaultCost?: number; - /** A boolean flag that indicates if a plan has customizable features. */ - readonly customizable?: boolean; - } & { readonly [key: string]: any }) & { readonly [key: string]: any }; - readonly ExpandedFeature: components["schemas"]["FeatureType"] & - ({ - /** The string value set for the feature on the plan, this should only be used if the value property is null. */ - readonly value_string: string; - readonly value: components["schemas"]["FeatureValueDetails"]; - } & { readonly [key: string]: any }) & { readonly [key: string]: any }; + readonly ExpandedPlanBody: components["schemas"]["PlanBody"] & { + /** An array of feature definitions for the plan, as defined on the Product. */ + readonly expanded_features: readonly components["schemas"]["ExpandedFeature"][]; + /** A boolean flag that indicates if a plan is free or not based on it's cost and features. */ + readonly free: boolean; + /** Plan cost using its default features plus base cost. */ + readonly defaultCost?: number; + /** A boolean flag that indicates if a plan has customizable features. */ + readonly customizable?: boolean; + }; + readonly ExpandedFeature: components["schemas"]["FeatureType"] & { + /** The string value set for the feature on the plan, this should only be used if the value property is null. */ + readonly value_string: string; + readonly value: components["schemas"]["FeatureValueDetails"]; + }; readonly Plan: { readonly id: components["schemas"]["ID"]; readonly version: number; readonly type: "plan"; readonly body: components["schemas"]["PlanBody"]; - } & { readonly [key: string]: any }; + }; readonly ExpandedPlan: { readonly id: components["schemas"]["ID"]; readonly version: number; readonly type: "plan"; readonly body: components["schemas"]["ExpandedPlanBody"]; - } & { readonly [key: string]: any }; + }; readonly CreatePlan: { readonly body: components["schemas"]["PlanBody"]; - } & { readonly [key: string]: any }; + }; /** Unexpected error */ readonly Error: { /** The error type */ readonly type: string; /** Explanation of the errors */ readonly message: readonly string[]; - } & { readonly [key: string]: any }; + }; /** * Describes how a feature cost should be calculated. An empty * string defaults to the normal price calculation using the value cost. @@ -1142,7 +1136,7 @@ export interface components { readonly body: components["schemas"]["ProductBody"]; readonly plans?: readonly components["schemas"]["ExpandedPlan"][]; readonly provider: components["schemas"]["Provider"]; - } & { readonly [key: string]: any }; + }; }; readonly parameters: { /** Filter results to only include those that have this label. */ diff --git a/tests/v3/expected/manifold.ts b/tests/v3/expected/manifold.ts index 135358b63..d133f154c 100644 --- a/tests/v3/expected/manifold.ts +++ b/tests/v3/expected/manifold.ts @@ -684,19 +684,19 @@ export interface components { location: components["schemas"]["Location"]; name: string; priority: number; - } & { [key: string]: any }; + }; Region: { id: components["schemas"]["ID"]; type: "region"; version: number; body: components["schemas"]["RegionBody"]; - } & { [key: string]: any }; + }; CreateRegion: { body: components["schemas"]["RegionBody"]; - } & { [key: string]: any }; + }; UpdateRegion: { name: string; - } & { [key: string]: any }; + }; ProviderBody: { owner_id?: components["schemas"]["OptionalFlexID"]; team_id?: components["schemas"]["OptionalID"]; @@ -705,7 +705,7 @@ export interface components { logo_url?: components["schemas"]["LogoURL"]; support_email?: string; documentation_url?: string; - } & { [key: string]: any }; + }; UpdateProviderBody: { owner_id?: components["schemas"]["OptionalFlexID"]; team_id?: components["schemas"]["OptionalID"]; @@ -714,24 +714,24 @@ export interface components { logo_url?: components["schemas"]["OptionalLogoURL"]; support_email?: string | null; documentation_url?: string | null; - } & { [key: string]: any }; + }; Provider: { id: components["schemas"]["ID"]; version: number; type: "provider"; body: components["schemas"]["ProviderBody"]; - } & { [key: string]: any }; + }; CreateProvider: { body: components["schemas"]["ProviderBody"]; - } & { [key: string]: any }; + }; UpdateProvider: { id: components["schemas"]["ID"]; body: components["schemas"]["UpdateProviderBody"]; - } & { [key: string]: any }; + }; UpdateProduct: { id: components["schemas"]["ID"]; body: components["schemas"]["UpdateProductBody"]; - } & { [key: string]: any }; + }; UpdateProductBody: { name?: components["schemas"]["Name"]; label?: components["schemas"]["Label"]; @@ -752,28 +752,26 @@ export interface components { */ terms_url?: string | null; feature_types?: components["schemas"]["FeatureType"][] | null; - integration?: - | ({ - provisioning?: components["schemas"]["ProductProvisioning"]; - base_url?: string | null; - sso_url?: string | null; - version?: "v1" | null; - features?: { - access_code?: boolean | null; - sso?: boolean | null; - plan_change?: boolean | null; - credential?: ("none" | "single" | "multiple" | "unknown") | null; - } & { [key: string]: any }; - } & { [key: string]: any }) - | null; + integration?: { + provisioning?: components["schemas"]["ProductProvisioning"]; + base_url?: string | null; + sso_url?: string | null; + version?: "v1" | null; + features?: { + access_code?: boolean | null; + sso?: boolean | null; + plan_change?: boolean | null; + credential?: ("none" | "single" | "multiple" | "unknown") | null; + }; + } | null; /** An array of platform ids to restrict this product for. */ platform_ids?: components["schemas"]["ID"][] | null; tags?: components["schemas"]["ProductTags"]; - } & { [key: string]: any }; + }; UpdatePlan: { id: components["schemas"]["ID"]; body: components["schemas"]["UpdatePlanBody"]; - } & { [key: string]: any }; + }; UpdatePlanBody: { name?: components["schemas"]["Name"]; label?: components["schemas"]["Label"]; @@ -793,7 +791,7 @@ export interface components { trial_days?: number | null; /** Dollar value in cents */ cost?: number | null; - } & { [key: string]: any }; + }; /** * A feature type represents the different aspects of a product that are * offered, these features can manifest differently depending on the plan. @@ -822,7 +820,7 @@ export interface components { */ measurable?: boolean; values?: components["schemas"]["FeatureValuesList"]; - } & { [key: string]: any }; + }; /** * A list of allowable values for the feature. * To define values for a boolean feature type, only `true` is required, @@ -861,33 +859,31 @@ export interface components { formula?: components["schemas"]["PriceFormula"]; /** Description explains how a feature is calculated to the user. */ description?: string; - } & { [key: string]: any }; + }; numeric_details?: components["schemas"]["FeatureNumericDetails"]; - } & { [key: string]: any }; + }; /** * Optional container for additional details relating to numeric features. * This is required if the feature is measurable and numeric. */ - FeatureNumericDetails: - | ({ - /** - * 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; - /** Minimum value that can be set by a user if customizable */ - min?: number; - /** Maximum value that can be set by a user if customizable */ - max?: number | null; - /** Applied to the end of the number for display, for example the ‘GB’ in ‘20 GB’. */ - suffix?: string | null; - cost_ranges?: components["schemas"]["FeatureNumericRange"][] | null; - } & { [key: string]: any }) - | null; + FeatureNumericDetails: { + /** + * 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; + /** Minimum value that can be set by a user if customizable */ + min?: number; + /** Maximum value that can be set by a user if customizable */ + max?: number | null; + /** Applied to the end of the number for display, for example the ‘GB’ in ‘20 GB’. */ + suffix?: string | null; + cost_ranges?: components["schemas"]["FeatureNumericRange"][] | null; + } | null; FeatureNumericRange: { /** * Defines the end of the range ( inclusive ), from the previous, or 0; @@ -901,17 +897,17 @@ export interface components { * numeric value set in the feature to determine the cost. */ cost_multiple?: number; - } & { [key: string]: any }; + }; FeatureValue: { feature: components["schemas"]["Label"]; value: components["schemas"]["FeatureValueLabel"]; - } & { [key: string]: any }; + }; ValueProp: { /** Heading of a value proposition. */ header: string; /** Body of a value proposition. */ body: string; - } & { [key: string]: any }; + }; /** * Image URL used for Product listings. * @@ -960,8 +956,8 @@ export interface components { * product, it is just used to inform consumers through our clients. */ featured?: boolean; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** * 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. @@ -1001,7 +997,7 @@ export interface components { * * `unknown`: The credential type is unknown. */ credential?: "none" | "single" | "multiple" | "unknown"; - } & { [key: string]: any }; + }; ProductBody: { provider_id: components["schemas"]["ID"]; label: components["schemas"]["Label"]; @@ -1025,30 +1021,30 @@ export interface components { terms: { url?: string | null; provided: boolean; - } & { [key: string]: any }; + }; feature_types: components["schemas"]["FeatureType"][]; billing: { type: "monthly-prorated" | "monthly-anniversary" | "annual-anniversary"; currency: "usd"; - } & { [key: string]: any }; + }; integration: { provisioning: components["schemas"]["ProductProvisioning"]; base_url: string; sso_url?: string | null; version: "v1"; features: components["schemas"]["ProductIntegrationFeatures"]; - } & { [key: string]: any }; + }; tags?: components["schemas"]["ProductTags"]; - } & { [key: string]: any }; + }; Product: { id: components["schemas"]["ID"]; version: number; type: "product"; body: components["schemas"]["ProductBody"]; - } & { [key: string]: any }; + }; CreateProduct: { body: components["schemas"]["ProductBody"]; - } & { [key: string]: any }; + }; /** Array of Plan IDs that this Plan can be resized to, if null all will be assumed */ PlanResizeList: components["schemas"]["ID"][] | null; PlanBody: { @@ -1070,47 +1066,45 @@ export interface components { trial_days?: number; /** Dollar value in cents. */ cost: number; - } & { [key: string]: any }; + }; PlanState: "hidden" | "available" | "grandfathered" | "unlisted"; - ExpandedPlanBody: components["schemas"]["PlanBody"] & - ({ - /** An array of feature definitions for the plan, as defined on the Product. */ - expanded_features: components["schemas"]["ExpandedFeature"][]; - /** A boolean flag that indicates if a plan is free or not based on it's cost and features. */ - free: boolean; - /** Plan cost using its default features plus base cost. */ - defaultCost?: number; - /** A boolean flag that indicates if a plan has customizable features. */ - customizable?: boolean; - } & { [key: string]: any }) & { [key: string]: any }; - ExpandedFeature: components["schemas"]["FeatureType"] & - ({ - /** The string value set for the feature on the plan, this should only be used if the value property is null. */ - value_string: string; - value: components["schemas"]["FeatureValueDetails"]; - } & { [key: string]: any }) & { [key: string]: any }; + ExpandedPlanBody: components["schemas"]["PlanBody"] & { + /** An array of feature definitions for the plan, as defined on the Product. */ + expanded_features: components["schemas"]["ExpandedFeature"][]; + /** A boolean flag that indicates if a plan is free or not based on it's cost and features. */ + free: boolean; + /** Plan cost using its default features plus base cost. */ + defaultCost?: number; + /** A boolean flag that indicates if a plan has customizable features. */ + customizable?: boolean; + }; + ExpandedFeature: components["schemas"]["FeatureType"] & { + /** The string value set for the feature on the plan, this should only be used if the value property is null. */ + value_string: string; + value: components["schemas"]["FeatureValueDetails"]; + }; Plan: { id: components["schemas"]["ID"]; version: number; type: "plan"; body: components["schemas"]["PlanBody"]; - } & { [key: string]: any }; + }; ExpandedPlan: { id: components["schemas"]["ID"]; version: number; type: "plan"; body: components["schemas"]["ExpandedPlanBody"]; - } & { [key: string]: any }; + }; CreatePlan: { body: components["schemas"]["PlanBody"]; - } & { [key: string]: any }; + }; /** Unexpected error */ Error: { /** The error type */ type: string; /** Explanation of the errors */ message: string[]; - } & { [key: string]: any }; + }; /** * Describes how a feature cost should be calculated. An empty * string defaults to the normal price calculation using the value cost. @@ -1142,7 +1136,7 @@ export interface components { body: components["schemas"]["ProductBody"]; plans?: components["schemas"]["ExpandedPlan"][]; provider: components["schemas"]["Provider"]; - } & { [key: string]: any }; + }; }; parameters: { /** Filter results to only include those that have this label. */ diff --git a/tests/v3/expected/null-in-enum.additional.ts b/tests/v3/expected/null-in-enum.additional.ts new file mode 100644 index 000000000..1f18e072b --- /dev/null +++ b/tests/v3/expected/null-in-enum.additional.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: { + responses: { + /** A list of types. */ + 200: unknown; + }; + }; + }; +} + +export interface components { + schemas: { + /** Enum with null and nullable */ + MyType: { + myField?: ("foo" | "bar") | null; + } & { [key: string]: any }; + /** Enum with null */ + MyTypeNotNullable: { + myField?: "foo" | "bar" | null; + } & { [key: string]: any }; + /** Enum with null */ + MyTypeNotNullableNotNull: { + myField?: "foo" | "bar"; + } & { [key: string]: any }; + /** Enum with null */ + MyTypeMixed: { + myField?: "foo" | 2 | false | null; + } & { [key: string]: any }; + }; +} + +export interface operations {} diff --git a/tests/v3/expected/null-in-enum.immutable.ts b/tests/v3/expected/null-in-enum.immutable.ts index b34de619b..cce6a886e 100644 --- a/tests/v3/expected/null-in-enum.immutable.ts +++ b/tests/v3/expected/null-in-enum.immutable.ts @@ -19,19 +19,19 @@ export interface components { /** Enum with null and nullable */ readonly MyType: { readonly myField?: ("foo" | "bar") | null; - } & { readonly [key: string]: any }; + }; /** Enum with null */ readonly MyTypeNotNullable: { readonly myField?: "foo" | "bar" | null; - } & { readonly [key: string]: any }; + }; /** Enum with null */ readonly MyTypeNotNullableNotNull: { readonly myField?: "foo" | "bar"; - } & { readonly [key: string]: any }; + }; /** Enum with null */ readonly MyTypeMixed: { readonly myField?: "foo" | 2 | false | null; - } & { readonly [key: string]: any }; + }; }; } diff --git a/tests/v3/expected/null-in-enum.ts b/tests/v3/expected/null-in-enum.ts index 1f18e072b..5e162ed60 100644 --- a/tests/v3/expected/null-in-enum.ts +++ b/tests/v3/expected/null-in-enum.ts @@ -19,19 +19,19 @@ export interface components { /** Enum with null and nullable */ MyType: { myField?: ("foo" | "bar") | null; - } & { [key: string]: any }; + }; /** Enum with null */ MyTypeNotNullable: { myField?: "foo" | "bar" | null; - } & { [key: string]: any }; + }; /** Enum with null */ MyTypeNotNullableNotNull: { myField?: "foo" | "bar"; - } & { [key: string]: any }; + }; /** Enum with null */ MyTypeMixed: { myField?: "foo" | 2 | false | null; - } & { [key: string]: any }; + }; }; } diff --git a/tests/v3/expected/petstore-openapitools.additional.ts b/tests/v3/expected/petstore-openapitools.additional.ts new file mode 100644 index 000000000..c4050a457 --- /dev/null +++ b/tests/v3/expected/petstore-openapitools.additional.ts @@ -0,0 +1,478 @@ +/** + * 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/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"]; + }; + "/pet/{petId}": { + /** Returns a single pet */ + get: operations["getPetById"]; + post: operations["updatePetWithForm"]; + delete: operations["deletePet"]; + }; + "/pet/{petId}/uploadImage": { + post: operations["uploadFile"]; + }; + "/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/createWithArray": { + post: operations["createUsersWithArrayInput"]; + }; + "/user/createWithList": { + post: operations["createUsersWithListInput"]; + }; + "/user/login": { + get: operations["loginUser"]; + }; + "/user/logout": { + get: operations["logoutUser"]; + }; + "/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"]; + }; +} + +export interface components { + schemas: { + /** An order for a pets from the pet store */ + Order: { + id?: number; + petId?: number; + quantity?: number; + shipDate?: string; + /** Order Status */ + status?: "placed" | "approved" | "delivered"; + complete?: boolean; + } & { [key: string]: any }; + /** A category for a pet */ + Category: { + id?: number; + name?: string; + } & { [key: string]: any }; + /** A User who is purchasing from the pet store */ + User: { + id?: number; + username?: string; + firstName?: string; + lastName?: string; + email?: string; + password?: string; + phone?: string; + /** User Status */ + userStatus?: number; + } & { [key: string]: any }; + /** A tag for a pet */ + Tag: { + id?: number; + name?: string; + } & { [key: string]: any }; + /** A pet for sale in the pet store */ + Pet: { + id?: number; + category?: components["schemas"]["Category"]; + name: string; + photoUrls: string[]; + tags?: components["schemas"]["Tag"][]; + /** pet status in the store */ + status?: "available" | "pending" | "sold"; + } & { [key: string]: any }; + /** Describes the result of uploading an image resource */ + ApiResponse: { + code?: number; + type?: string; + message?: string; + } & { [key: string]: any }; + }; + requestBodies: { + /** List of user object */ + UserArray: { + content: { + "application/json": components["schemas"]["User"][]; + }; + }; + /** Pet object that needs to be added to the store */ + Pet: { + content: { + "application/json": components["schemas"]["Pet"]; + "application/xml": components["schemas"]["Pet"]; + }; + }; + }; +} + +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"]; + }; + /** 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 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": { + /** Updated name of the pet */ + name?: string; + /** Updated status of the pet */ + status?: string; + } & { [key: string]: any }; + }; + }; + }; + 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": { + /** Additional data to pass to server */ + additionalMetadata?: string; + /** file to upload */ + file?: string; + } & { [key: string]: any }; + }; + }; + }; + /** 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"]; + }; + }; + }; + 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; + /** calls per hour allowed by the user */ + "X-Rate-Limit"?: number; + /** date in UTC when toekn expires */ + "X-Expires-After"?: string; + }; + content: { + "application/xml": string; + "application/json": string; + }; + }; + /** Invalid username/password supplied */ + 400: unknown; + }; + }; + logoutUser: { + 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: { + 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; + }; + }; +} diff --git a/tests/v3/expected/petstore-openapitools.immutable.ts b/tests/v3/expected/petstore-openapitools.immutable.ts index 55406a131..a3af49f30 100644 --- a/tests/v3/expected/petstore-openapitools.immutable.ts +++ b/tests/v3/expected/petstore-openapitools.immutable.ts @@ -74,12 +74,12 @@ export interface components { /** Order Status */ readonly status?: "placed" | "approved" | "delivered"; readonly complete?: boolean; - } & { readonly [key: string]: any }; + }; /** A category for a pet */ readonly Category: { readonly id?: number; readonly name?: string; - } & { readonly [key: string]: any }; + }; /** A User who is purchasing from the pet store */ readonly User: { readonly id?: number; @@ -91,12 +91,12 @@ export interface components { readonly phone?: string; /** User Status */ readonly userStatus?: number; - } & { readonly [key: string]: any }; + }; /** A tag for a pet */ readonly Tag: { readonly id?: number; readonly name?: string; - } & { readonly [key: string]: any }; + }; /** A pet for sale in the pet store */ readonly Pet: { readonly id?: number; @@ -106,13 +106,13 @@ export interface components { readonly tags?: readonly components["schemas"]["Tag"][]; /** pet status in the store */ readonly status?: "available" | "pending" | "sold"; - } & { readonly [key: string]: any }; + }; /** Describes the result of uploading an image resource */ readonly ApiResponse: { readonly code?: number; readonly type?: string; readonly message?: string; - } & { readonly [key: string]: any }; + }; }; readonly requestBodies: { /** List of user object */ @@ -244,7 +244,7 @@ export interface operations { readonly name?: string; /** Updated status of the pet */ readonly status?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -285,7 +285,7 @@ export interface operations { readonly additionalMetadata?: string; /** file to upload */ readonly file?: string; - } & { readonly [key: string]: any }; + }; }; }; }; diff --git a/tests/v3/expected/petstore-openapitools.ts b/tests/v3/expected/petstore-openapitools.ts index c4050a457..26fc4794b 100644 --- a/tests/v3/expected/petstore-openapitools.ts +++ b/tests/v3/expected/petstore-openapitools.ts @@ -74,12 +74,12 @@ export interface components { /** Order Status */ status?: "placed" | "approved" | "delivered"; complete?: boolean; - } & { [key: string]: any }; + }; /** A category for a pet */ Category: { id?: number; name?: string; - } & { [key: string]: any }; + }; /** A User who is purchasing from the pet store */ User: { id?: number; @@ -91,12 +91,12 @@ export interface components { phone?: string; /** User Status */ userStatus?: number; - } & { [key: string]: any }; + }; /** A tag for a pet */ Tag: { id?: number; name?: string; - } & { [key: string]: any }; + }; /** A pet for sale in the pet store */ Pet: { id?: number; @@ -106,13 +106,13 @@ export interface components { tags?: components["schemas"]["Tag"][]; /** pet status in the store */ status?: "available" | "pending" | "sold"; - } & { [key: string]: any }; + }; /** Describes the result of uploading an image resource */ ApiResponse: { code?: number; type?: string; message?: string; - } & { [key: string]: any }; + }; }; requestBodies: { /** List of user object */ @@ -244,7 +244,7 @@ export interface operations { name?: string; /** Updated status of the pet */ status?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -285,7 +285,7 @@ export interface operations { additionalMetadata?: string; /** file to upload */ file?: string; - } & { [key: string]: any }; + }; }; }; }; diff --git a/tests/v3/expected/petstore.additional.ts b/tests/v3/expected/petstore.additional.ts new file mode 100644 index 000000000..59460406a --- /dev/null +++ b/tests/v3/expected/petstore.additional.ts @@ -0,0 +1,465 @@ +/** + * 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/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"]; + }; + "/pet/{petId}": { + /** Returns a single pet */ + get: operations["getPetById"]; + post: operations["updatePetWithForm"]; + delete: operations["deletePet"]; + }; + "/pet/{petId}/uploadImage": { + post: operations["uploadFile"]; + }; + "/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/createWithArray": { + post: operations["createUsersWithArrayInput"]; + }; + "/user/createWithList": { + post: operations["createUsersWithListInput"]; + }; + "/user/login": { + get: operations["loginUser"]; + }; + "/user/logout": { + get: operations["logoutUser"]; + }; + "/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"]; + }; +} + +export interface components { + schemas: { + Order: { + id?: number; + petId?: number; + quantity?: number; + shipDate?: string; + /** Order Status */ + status?: "placed" | "approved" | "delivered"; + complete?: boolean; + } & { [key: string]: any }; + Category: { + id?: number; + name?: string; + } & { [key: string]: any }; + User: { + id?: number; + username?: string; + firstName?: string; + lastName?: string; + email?: string; + password?: string; + phone?: string; + /** User Status */ + userStatus?: number; + } & { [key: string]: any }; + Tag: { + id?: number; + name?: string; + } & { [key: string]: any }; + Pet: { + id?: number; + category?: components["schemas"]["Category"]; + name: string; + photoUrls: string[]; + tags?: components["schemas"]["Tag"][]; + /** pet status in the store */ + status?: "available" | "pending" | "sold"; + } & { [key: string]: any }; + ApiResponse: { + code?: number; + type?: string; + message?: string; + } & { [key: string]: any }; + }; +} + +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"]; + }; + }; + }; + /** 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 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": { + /** Updated name of the pet */ + name?: string; + /** Updated status of the pet */ + status?: string; + } & { [key: string]: any }; + }; + }; + }; + 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": { + /** Additional data to pass to server */ + additionalMetadata?: string; + /** file to upload */ + file?: string; + } & { [key: string]: any }; + }; + }; + }; + /** 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"]; + }; + }; + }; + 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: { + /** calls per hour allowed by the user */ + "X-Rate-Limit"?: number; + /** date in UTC when token expires */ + "X-Expires-After"?: string; + }; + content: { + "application/xml": string; + "application/json": string; + }; + }; + /** Invalid username/password supplied */ + 400: unknown; + }; + }; + logoutUser: { + 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: { + 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; + }; + }; +} diff --git a/tests/v3/expected/petstore.immutable.ts b/tests/v3/expected/petstore.immutable.ts index 19e2f4a11..b4367c609 100644 --- a/tests/v3/expected/petstore.immutable.ts +++ b/tests/v3/expected/petstore.immutable.ts @@ -73,11 +73,11 @@ export interface components { /** Order Status */ readonly status?: "placed" | "approved" | "delivered"; readonly complete?: boolean; - } & { readonly [key: string]: any }; + }; readonly Category: { readonly id?: number; readonly name?: string; - } & { readonly [key: string]: any }; + }; readonly User: { readonly id?: number; readonly username?: string; @@ -88,11 +88,11 @@ export interface components { readonly phone?: string; /** User Status */ readonly userStatus?: number; - } & { readonly [key: string]: any }; + }; readonly Tag: { readonly id?: number; readonly name?: string; - } & { readonly [key: string]: any }; + }; readonly Pet: { readonly id?: number; readonly category?: components["schemas"]["Category"]; @@ -101,12 +101,12 @@ export interface components { readonly tags?: readonly components["schemas"]["Tag"][]; /** pet status in the store */ readonly status?: "available" | "pending" | "sold"; - } & { readonly [key: string]: any }; + }; readonly ApiResponse: { readonly code?: number; readonly type?: string; readonly message?: string; - } & { readonly [key: string]: any }; + }; }; } @@ -221,7 +221,7 @@ export interface operations { readonly name?: string; /** Updated status of the pet */ readonly status?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -264,7 +264,7 @@ export interface operations { readonly additionalMetadata?: string; /** file to upload */ readonly file?: string; - } & { readonly [key: string]: any }; + }; }; }; }; diff --git a/tests/v3/expected/petstore.ts b/tests/v3/expected/petstore.ts index 59460406a..756d358ac 100644 --- a/tests/v3/expected/petstore.ts +++ b/tests/v3/expected/petstore.ts @@ -73,11 +73,11 @@ export interface components { /** Order Status */ status?: "placed" | "approved" | "delivered"; complete?: boolean; - } & { [key: string]: any }; + }; Category: { id?: number; name?: string; - } & { [key: string]: any }; + }; User: { id?: number; username?: string; @@ -88,11 +88,11 @@ export interface components { phone?: string; /** User Status */ userStatus?: number; - } & { [key: string]: any }; + }; Tag: { id?: number; name?: string; - } & { [key: string]: any }; + }; Pet: { id?: number; category?: components["schemas"]["Category"]; @@ -101,12 +101,12 @@ export interface components { tags?: components["schemas"]["Tag"][]; /** pet status in the store */ status?: "available" | "pending" | "sold"; - } & { [key: string]: any }; + }; ApiResponse: { code?: number; type?: string; message?: string; - } & { [key: string]: any }; + }; }; } @@ -221,7 +221,7 @@ export interface operations { name?: string; /** Updated status of the pet */ status?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -264,7 +264,7 @@ export interface operations { additionalMetadata?: string; /** file to upload */ file?: string; - } & { [key: string]: any }; + }; }; }; }; diff --git a/tests/v3/expected/stripe.additional.ts b/tests/v3/expected/stripe.additional.ts new file mode 100644 index 000000000..68cf15715 --- /dev/null +++ b/tests/v3/expected/stripe.additional.ts @@ -0,0 +1,31341 @@ +/** + * 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/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/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/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/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/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/billing_portal/sessions": { + /**

Creates a session of the Self-service 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/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/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/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/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/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/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. To create a product for use with orders, see Products.

*/ + 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 components { + schemas: { + /** + * 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 information about the account. */ + business_profile?: (Partial & { [key: string]: any }) | null; + /** The business type. */ + business_type?: ("company" | "government_entity" | "individual" | "non_profit") | null; + capabilities?: components["schemas"]["account_capabilities"]; + /** Whether the account can create live charges. */ + charges_enabled?: boolean; + company?: components["schemas"]["legal_entity_company"]; + /** The account's country. */ + country?: string; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created?: number; + /** 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; + /** Whether account details have been submitted. Standard accounts cannot receive payouts before this is true. */ + details_submitted?: boolean; + /** The primary user's email address. */ + email?: string | null; + /** External accounts (bank accounts and debit cards) currently attached to this account */ + external_accounts?: { + /** The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ + data: ((Partial & Partial) & { + [key: string]: any; + })[]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + /** Unique identifier for the object. */ + id: string; + individual?: components["schemas"]["person"]; + /** Set of key-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]: string }; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "account"; + /** Whether Stripe can send payouts to this account. */ + payouts_enabled?: boolean; + requirements?: components["schemas"]["account_requirements"]; + /** Options for customizing how the account functions within Stripe. */ + settings?: (Partial & { [key: string]: any }) | null; + tos_acceptance?: components["schemas"]["account_tos_acceptance"]; + /** The Stripe account type. Can be `standard`, `express`, or `custom`. */ + type?: "custom" | "express" | "standard"; + } & { [key: string]: any }; + account_branding_settings: { + /** (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?: ((Partial & Partial) & { [key: string]: any }) | null; + /** (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?: ((Partial & Partial) & { [key: string]: any }) | null; + /** A CSS hex color value representing the primary branding color for this account */ + primary_color?: string | null; + /** A CSS hex color value representing the secondary branding color for this account */ + secondary_color?: string | null; + } & { [key: string]: any }; + account_business_profile: { + /** [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; + /** The customer-facing business name. */ + name?: string | null; + /** 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; + /** A publicly available mailing address for sending support issues to. */ + support_address?: (Partial & { [key: string]: any }) | null; + /** A publicly available email address for sending support issues to. */ + support_email?: string | null; + /** A publicly available phone number to call with support issues. */ + support_phone?: string | null; + /** A publicly available website for handling support issues. */ + support_url?: string | null; + /** The business's publicly available website. */ + url?: string | null; + } & { [key: string]: any }; + account_capabilities: { + /** 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. */ + au_becs_debit_payments?: "active" | "inactive" | "pending"; + /** The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards */ + card_issuing?: "active" | "inactive" | "pending"; + /** The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges. */ + card_payments?: "active" | "inactive" | "pending"; + /** The status of the legacy payments capability of the account. */ + legacy_payments?: "active" | "inactive" | "pending"; + /** The status of the tax reporting 1099-K (US) capability of the account. */ + tax_reporting_us_1099_k?: "active" | "inactive" | "pending"; + /** The status of the tax reporting 1099-MISC (US) capability of the account. */ + tax_reporting_us_1099_misc?: "active" | "inactive" | "pending"; + /** The status of the transfers capability of the account, or whether your platform can transfer funds to the account. */ + transfers?: "active" | "inactive" | "pending"; + } & { [key: string]: any }; + account_capability_requirements: { + /** The date the fields in `currently_due` must be collected by to keep the capability enabled for the account. */ + current_deadline?: number | null; + /** 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[]; + /** 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 | null; + /** The fields that need to be collected again because validation or verification failed for some reason. */ + errors: components["schemas"]["account_requirements_error"][]; + /** 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[]; + /** 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[]; + /** 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[]; + } & { [key: string]: any }; + account_card_payments_settings: { + decline_on?: components["schemas"]["account_decline_charge_on"]; + /** 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; + } & { [key: string]: any }; + account_dashboard_settings: { + /** The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts. */ + display_name?: string | null; + /** 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; + } & { [key: string]: any }; + account_decline_charge_on: { + /** 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; + /** 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; + } & { [key: string]: any }; + /** + * 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: { + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** The timestamp at which this account link will expire. */ + expires_at: number; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "account_link"; + /** The URL for the account link. */ + url: string; + } & { [key: string]: any }; + account_payments_settings: { + /** 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; + /** 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; + /** 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; + } & { [key: string]: any }; + account_payout_settings: { + /** 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: components["schemas"]["transfer_schedule"]; + /** 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; + } & { [key: string]: any }; + account_requirements: { + /** 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 | null; + /** 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[] | null; + /** 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 | null; + /** The fields that need to be collected again because validation or verification failed for some reason. */ + errors?: components["schemas"]["account_requirements_error"][] | null; + /** 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[] | null; + /** The fields that weren't collected by the `current_deadline`. These fields need to be collected to re-enable the account. */ + past_due?: string[] | null; + /** 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[] | null; + } & { [key: string]: any }; + account_requirements_error: { + /** The code for the type of error. */ + 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"; + /** An informative message that indicates the error type and provides additional details about the error. */ + reason: string; + /** The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. */ + requirement: string; + } & { [key: string]: any }; + account_settings: { + branding: components["schemas"]["account_branding_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"]; + } & { [key: string]: any }; + account_tos_acceptance: { + /** The Unix timestamp marking when the Stripe Services Agreement was accepted by the account representative */ + date?: number | null; + /** The IP address from which the Stripe Services Agreement was accepted by the account representative */ + ip?: string | null; + /** The user agent of the browser from which the Stripe Services Agreement was accepted by the account representative */ + user_agent?: string | null; + } & { [key: string]: any }; + address: { + /** City, district, suburb, town, or village. */ + city?: string | null; + /** Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country?: string | null; + /** Address line 1 (e.g., street, PO Box, or company name). */ + line1?: string | null; + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + line2?: string | null; + /** ZIP or postal code. */ + postal_code?: string | null; + /** State, county, province, or region. */ + state?: string | null; + } & { [key: string]: any }; + alipay_account: { + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** The ID of the customer associated with this Alipay Account. */ + customer?: + | ((Partial & + Partial & + Partial) & { [key: string]: any }) + | null; + /** Uniquely identifies the account and will be the same across all Alipay account objects that are linked to the same Alipay account. */ + fingerprint: string; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "alipay_account"; + /** If the Alipay account object is not reusable, the exact amount that you can create a charge for. */ + payment_amount?: number | null; + /** If the Alipay account object is not reusable, the exact currency that you can create a charge for. */ + payment_currency?: string | null; + /** 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; + /** Whether this Alipay account object has ever been used for a payment. */ + used: boolean; + /** The username for the Alipay account. */ + username: string; + } & { [key: string]: any }; + api_errors: { + /** For card errors, the ID of the failed charge. */ + charge?: string; + /** For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. */ + code?: string; + /** 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; + /** A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. */ + doc_url?: string; + /** A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. */ + message?: string; + /** 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"]; + setup_intent?: components["schemas"]["setup_intent"]; + /** The source object for errors returned on a request involving a source. */ + source?: (Partial & + Partial & + Partial) & { [key: string]: any }; + /** 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` */ + type: + | "api_connection_error" + | "api_error" + | "authentication_error" + | "card_error" + | "idempotency_error" + | "invalid_request_error" + | "rate_limit_error"; + } & { [key: string]: any }; + apple_pay_domain: { + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + domain_name: string; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "apple_pay_domain"; + } & { [key: string]: any }; + application: { + /** Unique identifier for the object. */ + id: string; + /** The name of the application. */ + name?: string | null; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "application"; + } & { [key: string]: any }; + application_fee: { + /** ID of the Stripe account this fee was taken from. */ + account: (Partial & Partial) & { [key: string]: any }; + /** Amount earned, in %s. */ + amount: number; + /** Amount in %s refunded (can be less than the amount attribute on the fee if a partial refund was issued) */ + amount_refunded: number; + /** ID of the Connect application that earned the fee. */ + application: (Partial & Partial) & { [key: string]: any }; + /** Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). */ + balance_transaction?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** ID of the charge that the application fee was taken from. */ + charge: (Partial & Partial) & { [key: string]: any }; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "application_fee"; + /** ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter. */ + originating_transaction?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. */ + refunded: boolean; + /** A list of refunds that have been applied to the fee. */ + refunds: { + /** Details about each object. */ + data: components["schemas"]["fee_refund"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** + * 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: { + /** 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"][]; + /** 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"][]; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "balance"; + /** 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"][]; + } & { [key: string]: any }; + balance_amount: { + /** Balance amount. */ + amount: number; + /** 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"]; + } & { [key: string]: any }; + balance_amount_by_source_type: { + /** Amount for bank account. */ + bank_account?: number; + /** Amount for card. */ + card?: number; + /** Amount for FPX. */ + fpx?: number; + } & { [key: string]: any }; + /** + * 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: { + /** Gross amount of the transaction, in %s. */ + amount: number; + /** The date the transaction's net funds will become available in the Stripe balance. */ + available_on: number; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null; + /** 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; + /** Fees (in %s) paid for this transaction. */ + fee: number; + /** Detailed breakdown of fees (in %s) paid for this transaction. */ + fee_details: components["schemas"]["fee"][]; + /** Unique identifier for the object. */ + id: string; + /** Net amount of the transaction, in %s. */ + net: number; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "balance_transaction"; + /** [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; + /** The Stripe object to which this transaction is related. */ + source?: + | ((Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial) & { [key: string]: any }) + | null; + /** If the transaction's net funds are available in the Stripe balance yet. Either `available` or `pending`. */ + status: string; + /** 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. */ + 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"; + } & { [key: string]: any }; + /** + * 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: { + /** The ID of the account that the bank account is associated with. */ + account?: ((Partial & Partial) & { [key: string]: any }) | null; + /** The name of the person or business that owns the bank account. */ + account_holder_name?: string | null; + /** The type of entity that holds the account. This can be either `individual` or `company`. */ + account_holder_type?: string | null; + /** Name of the bank associated with the routing number (e.g., `WELLS FARGO`). */ + bank_name?: string | null; + /** Two-letter ISO code representing the country the bank account is located in. */ + country: string; + /** Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ + currency: string; + /** The ID of the customer that the bank account is associated with. */ + customer?: + | ((Partial & + Partial & + Partial) & { [key: string]: any }) + | null; + /** Whether this bank account is the default external account for its currency. */ + default_for_currency?: boolean | null; + /** Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null; + /** Unique identifier for the object. */ + id: string; + /** The last four digits of the bank account number. */ + last4: 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. */ + metadata?: { [key: string]: string } | null; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "bank_account"; + /** The routing transit number for the bank account. */ + routing_number?: string | null; + /** + * 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; + } & { [key: string]: any }; + billing_details: { + /** Billing address. */ + address?: (Partial & { [key: string]: any }) | null; + /** Email address. */ + email?: string | null; + /** Full name. */ + name?: string | null; + /** Billing phone number (including extension). */ + phone?: string | null; + } & { [key: string]: any }; + /** + * 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": { + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** The ID of the customer for this session. */ + customer: string; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "billing_portal.session"; + /** The URL to which Stripe should send customers when they click on the link to return to your website. */ + return_url: string; + /** The short-lived URL of the session giving customers access to the self-serve portal. */ + url: string; + } & { [key: string]: any }; + bitcoin_receiver: { + /** True when this bitcoin receiver has received a non-zero amount of bitcoin. */ + active: boolean; + /** The amount of `currency` that you are collecting as payment. */ + amount: number; + /** The amount of `currency` to which `bitcoin_amount_received` has been converted. */ + amount_received: number; + /** 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; + /** The amount of bitcoin that has been sent by the customer to this receiver. */ + bitcoin_amount_received: number; + /** 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; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) to which the bitcoin will be converted. */ + currency: string; + /** The customer ID of the bitcoin receiver. */ + customer?: string | null; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null; + /** The customer's email address, set by the API call that creates the receiver. */ + email?: string | null; + /** This flag is initially false and updates to true when the customer sends the `bitcoin_amount` to this receiver. */ + filled: boolean; + /** Unique identifier for the object. */ + id: string; + /** A bitcoin address that is specific to this receiver. The customer can send bitcoin to this address to fill the receiver. */ + inbound_address: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "bitcoin_receiver"; + /** The ID of the payment created from the receiver, if any. Hidden when viewing the receiver with a publishable key. */ + payment?: string | null; + /** The refund address of this bitcoin receiver. */ + refund_address?: string | null; + /** 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?: { + /** Details about each object. */ + data: components["schemas"]["bitcoin_transaction"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + /** This receiver contains uncaptured funds that can be used for a payment or refunded. */ + uncaptured_funds: boolean; + /** Indicate if this source is used for payment. */ + used_for_payment?: boolean | null; + } & { [key: string]: any }; + bitcoin_transaction: { + /** The amount of `currency` that the transaction was converted to in real-time. */ + amount: number; + /** The amount of bitcoin contained in the transaction. */ + bitcoin_amount: number; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) to which this transaction was converted. */ + currency: string; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "bitcoin_transaction"; + /** The receiver to which this transaction was sent. */ + receiver: string; + } & { [key: string]: any }; + /** + * This is an object representing a capability for a Stripe account. + * + * Related guide: [Capabilities Overview](https://stripe.com/docs/connect/capabilities-overview). + */ + capability: { + /** The account for which the capability enables functionality. */ + account: (Partial & Partial) & { [key: string]: any }; + /** The identifier for the capability. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "capability"; + /** Whether the capability has been requested. */ + requested: boolean; + /** Time at which the capability was requested. Measured in seconds since the Unix epoch. */ + requested_at?: number | null; + requirements?: components["schemas"]["account_capability_requirements"]; + /** The status of the capability. Can be `active`, `inactive`, `pending`, or `unrequested`. */ + status: "active" | "disabled" | "inactive" | "pending" | "unrequested"; + } & { [key: string]: any }; + /** + * 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: { + /** 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?: ((Partial & Partial) & { [key: string]: any }) | null; + /** City/District/Suburb/Town/Village. */ + address_city?: string | null; + /** Billing address country, if provided when creating card. */ + address_country?: string | null; + /** Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string | null; + /** If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_line1_check?: string | null; + /** Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string | null; + /** State/County/Province/Region. */ + address_state?: string | null; + /** ZIP or postal code. */ + address_zip?: string | null; + /** If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_zip_check?: string | null; + /** 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")[] | null; + /** Card brand. Can be `American Express`, `Diners Club`, `Discover`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. */ + brand: string; + /** 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; + currency?: string | null; + /** 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?: + | ((Partial & + Partial & + Partial) & { [key: string]: any }) + | null; + /** If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. */ + cvc_check?: string | null; + /** Whether this card is the default external account for its currency. */ + default_for_currency?: boolean | null; + /** (For tokenized numbers only.) The last four digits of the device account number. */ + dynamic_last4?: string | null; + /** Two-digit number representing the card's expiration month. */ + exp_month: number; + /** Four-digit number representing the card's expiration year. */ + exp_year: number; + /** 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 | null; + /** Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding: string; + /** Unique identifier for the object. */ + id: string; + /** The last four digits of the card. */ + last4: 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. */ + metadata: { [key: string]: string }; + /** Cardholder name. */ + name?: string | null; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "card"; + /** 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?: ((Partial & Partial) & { [key: string]: any }) | null; + /** 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 | null; + } & { [key: string]: any }; + card_mandate_payment_method_details: { [key: string]: any }; + /** + * 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: { + /** 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; + /** Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued). */ + amount_refunded: number; + /** ID of the Connect application that created the charge. */ + application?: ((Partial & Partial) & { [key: string]: any }) | null; + /** 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?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** 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 | null; + /** ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). */ + balance_transaction?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + billing_details: components["schemas"]["billing_details"]; + /** 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; + /** If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. */ + captured: boolean; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** ID of the customer this charge is for if one exists. */ + customer?: + | ((Partial & + Partial & + Partial) & { [key: string]: any }) + | null; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null; + /** Whether the charge has been disputed. */ + disputed: boolean; + /** 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; + /** Message to user further explaining reason for charge failure if available. */ + failure_message?: string | null; + /** Information on fraud assessments for the charge. */ + fraud_details?: (Partial & { [key: string]: any }) | null; + /** Unique identifier for the object. */ + id: string; + /** ID of the invoice this charge is for if one exists. */ + invoice?: ((Partial & Partial) & { [key: string]: any }) | null; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "charge"; + /** 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?: ((Partial & Partial) & { [key: string]: any }) | null; + /** ID of the order this charge is for if one exists. */ + order?: ((Partial & Partial) & { [key: string]: any }) | null; + /** Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. */ + outcome?: (Partial & { [key: string]: any }) | null; + /** `true` if the charge succeeded, or was successfully authorized for later capture. */ + paid: boolean; + /** ID of the PaymentIntent associated with this charge, if one exists. */ + payment_intent?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** ID of the payment method used in this charge. */ + payment_method?: string | null; + /** Details about the payment method at the time of the transaction. */ + payment_method_details?: + | (Partial & { [key: string]: any }) + | null; + /** This is the email address that the receipt for this charge was sent to. */ + receipt_email?: string | null; + /** 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; + /** 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; + /** Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. */ + refunded: boolean; + /** A list of refunds that have been applied to the charge. */ + refunds: { + /** Details about each object. */ + data: components["schemas"]["refund"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + /** ID of the review associated with this charge if one exists. */ + review?: ((Partial & Partial) & { [key: string]: any }) | null; + /** Shipping information for the charge. */ + shipping?: (Partial & { [key: string]: any }) | null; + /** 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?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** 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; + /** 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; + /** The status of the payment is either `succeeded`, `pending`, or `failed`. */ + status: string; + /** ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). */ + transfer?: (Partial & Partial) & { [key: string]: any }; + /** 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?: (Partial & { [key: string]: any }) | null; + /** 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; + } & { [key: string]: any }; + charge_fraud_details: { + /** Assessments from Stripe. If set, the value is `fraudulent`. */ + stripe_report?: string; + /** Assessments reported by you. If set, possible values of are `safe` and `fraudulent`. */ + user_report?: string; + } & { [key: string]: any }; + charge_outcome: { + /** 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; + /** 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; + /** 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; + /** 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; + /** The ID of the Radar rule that matched the payment, if applicable. */ + rule?: (Partial & Partial) & { [key: string]: any }; + /** 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; + /** 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; + } & { [key: string]: any }; + charge_transfer_data: { + /** The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. */ + amount?: number | null; + /** ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. */ + destination: (Partial & Partial) & { [key: string]: any }; + } & { [key: string]: any }; + /** + * 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": { + /** + * The value (`auto` or `required`) for whether Checkout collected the + * customer's billing address. + */ + billing_address_collection?: string | null; + /** The URL the customer will be directed to if they decide to cancel payment and return to your website. */ + cancel_url: string; + /** + * 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; + /** + * 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?: ((Partial & Partial) & { [key: string]: any }) | null; + /** + * 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 | null; + /** The line items, plans, or SKUs purchased by the customer. */ + display_items?: components["schemas"]["checkout_session_display_item"][] | null; + /** + * Unique identifier for the object. Used to pass to `redirectToCheckout` + * in Stripe.js. + */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. */ + locale?: + | ( + | "auto" + | "da" + | "de" + | "en" + | "es" + | "fi" + | "fr" + | "it" + | "ja" + | "ms" + | "nb" + | "nl" + | "pl" + | "pt" + | "pt-BR" + | "sv" + | "zh" + ) + | null; + /** Set of key-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]: string } | null; + /** The mode of the Checkout Session, one of `payment`, `setup`, or `subscription`. */ + mode?: ("payment" | "setup" | "subscription") | null; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "checkout.session"; + /** The ID of the PaymentIntent for Checkout Sessions in `payment` mode. */ + payment_intent?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** + * A list of the types of payment methods (e.g. card) this Checkout + * Session is allowed to accept. + */ + payment_method_types: string[]; + /** The ID of the SetupIntent for Checkout Sessions in `setup` mode. */ + setup_intent?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** Shipping information for this Checkout Session. */ + shipping?: (Partial & { [key: string]: any }) | null; + /** When set, provides configuration for Checkout to collect a shipping address from a customer. */ + shipping_address_collection?: + | (Partial & { + [key: string]: any; + }) + | null; + /** + * 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. + */ + submit_type?: ("auto" | "book" | "donate" | "pay") | null; + /** The ID of the subscription for Checkout Sessions in `subscription` mode. */ + subscription?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** + * The URL the customer will be directed to after the payment or + * subscription creation is successful. + */ + success_url: string; + } & { [key: string]: any }; + checkout_session_custom_display_item_description: { + /** The description of the line item. */ + description?: string | null; + /** The images of the line item. */ + images?: string[] | null; + /** The name of the line item. */ + name: string; + } & { [key: string]: any }; + checkout_session_display_item: { + /** Amount for the display item. */ + amount?: number; + /** 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?: components["schemas"]["checkout_session_custom_display_item_description"]; + plan?: components["schemas"]["plan"]; + /** Quantity of the display item being purchased. */ + quantity?: number; + sku?: components["schemas"]["sku"]; + /** The type of display item. One of `custom`, `plan` or `sku` */ + type?: string; + } & { [key: string]: any }; + connect_collection_transfer: { + /** Amount transferred, in %s. */ + amount: number; + /** 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; + /** ID of the account that funds are being collected for. */ + destination: (Partial & Partial) & { [key: string]: any }; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "connect_collection_transfer"; + } & { [key: string]: any }; + /** + * 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: { + /** The default currency for this country. This applies to both payment methods and bank accounts. */ + default_currency: string; + /** Unique identifier for the object. Represented as the ISO country code for this country. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "country_spec"; + /** Currencies that can be accepted in the specific country (for transfers). */ + supported_bank_account_currencies: { [key: string]: string[] }; + /** Currencies that can be accepted in the specified country (for payments). */ + supported_payment_currencies: string[]; + /** 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[]; + /** Countries that can accept transfers from the specified country. */ + supported_transfer_countries: string[]; + verification_fields: components["schemas"]["country_spec_verification_fields"]; + } & { [key: string]: any }; + country_spec_verification_field_details: { + /** Additional fields which are only required for some users. */ + additional: string[]; + /** Fields which every account must eventually provide. */ + minimum: string[]; + } & { [key: string]: any }; + country_spec_verification_fields: { + company: components["schemas"]["country_spec_verification_field_details"]; + individual: components["schemas"]["country_spec_verification_field_details"]; + } & { [key: string]: any }; + /** + * 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: { + /** Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. */ + amount_off?: number | null; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount. */ + duration: "forever" | "once" | "repeating"; + /** If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`. */ + duration_in_months?: number | null; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. */ + max_redemptions?: number | null; + /** Set of key-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]: string }; + /** Name of the coupon displayed to customers on for instance invoices or receipts. */ + name?: string | null; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "coupon"; + /** 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; + /** Date after which the coupon can no longer be redeemed. */ + redeem_by?: number | null; + /** Number of times this coupon has been applied to a customer. */ + times_redeemed: number; + /** Taking account of the above properties, whether this coupon can still be applied to a customer. */ + valid: boolean; + } & { [key: string]: any }; + /** + * 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: { + /** The integer amount in **%s** representing the total amount of the credit note, including tax. */ + amount: number; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** ID of the customer. */ + customer: (Partial & Partial) & { [key: string]: any }; + /** Customer balance transaction related to this credit note. */ + customer_balance_transaction?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** The integer amount in **%s** representing the amount of the discount that was credited. */ + discount_amount: number; + /** Unique identifier for the object. */ + id: string; + /** ID of the invoice. */ + invoice: (Partial & Partial) & { [key: string]: any }; + /** Line items that make up the credit note */ + lines: { + /** Details about each object. */ + data: components["schemas"]["credit_note_line_item"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Customer-facing text that appears on the credit note PDF. */ + memo?: string | null; + /** Set of key-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]: string }; + /** A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. */ + number: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "credit_note"; + /** Amount that was credited outside of Stripe. */ + out_of_band_amount?: number | null; + /** The link to download the PDF of the credit note. */ + pdf: string; + /** Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` */ + reason?: ("duplicate" | "fraudulent" | "order_change" | "product_unsatisfactory") | null; + /** Refund related to this credit note. */ + refund?: ((Partial & Partial) & { [key: string]: any }) | null; + /** 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). */ + status: "issued" | "void"; + /** The integer amount in **%s** representing the amount of the credit note, excluding tax and discount. */ + subtotal: number; + /** The aggregate amounts calculated per tax rate for all line items. */ + tax_amounts: components["schemas"]["credit_note_tax_amount"][]; + /** The integer amount in **%s** representing the total amount of the credit note, including tax and discount. */ + total: number; + /** 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. */ + type: "post_payment" | "pre_payment"; + /** The time that the credit note was voided. */ + voided_at?: number | null; + } & { [key: string]: any }; + credit_note_line_item: { + /** The integer amount in **%s** representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. */ + amount: number; + /** Description of the item being credited. */ + description?: string | null; + /** The integer amount in **%s** representing the discount being credited for this line item. */ + discount_amount: number; + /** Unique identifier for the object. */ + id: string; + /** ID of the invoice line item being credited */ + invoice_line_item?: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "credit_note_line_item"; + /** The number of units of product being credited. */ + quantity?: number | null; + /** The amount of tax calculated per tax rate for this line item */ + tax_amounts: components["schemas"]["credit_note_tax_amount"][]; + /** The tax rates which apply to the line item. */ + tax_rates: components["schemas"]["tax_rate"][]; + /** 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. */ + type: "custom_line_item" | "invoice_line_item"; + /** The cost of each unit of product being credited. */ + unit_amount?: number | null; + /** Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. */ + unit_amount_decimal?: string | null; + } & { [key: string]: any }; + credit_note_tax_amount: { + /** The amount, in %s, of the tax. */ + amount: number; + /** Whether this tax amount is inclusive or exclusive. */ + inclusive: boolean; + /** The tax rate that was applied to get this tax amount. */ + tax_rate: (Partial & Partial) & { [key: string]: any }; + } & { [key: string]: any }; + /** + * `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: { + /** The customer's address. */ + address?: (Partial & { [key: string]: any }) | null; + /** 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; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** + * 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?: + | ((Partial & + Partial & + Partial & + Partial & + Partial & + Partial) & { [key: string]: any }) + | null; + /** 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 | null; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null; + /** Describes the current discount active on the customer, if there is one. */ + discount?: (Partial & { [key: string]: any }) | null; + /** The customer's email address. */ + email?: string | null; + /** Unique identifier for the object. */ + id: string; + /** The prefix for the customer used to generate unique invoice numbers. */ + invoice_prefix?: string | null; + invoice_settings?: components["schemas"]["invoice_setting_customer_setting"]; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** The customer's full name or business name. */ + name?: string | null; + /** The suffix of the customer's next invoice number, e.g., 0001. */ + next_invoice_sequence?: number; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "customer"; + /** The customer's phone number. */ + phone?: string | null; + /** The customer's preferred locales (languages), ordered by preference. */ + preferred_locales?: string[] | null; + /** Mailing and shipping address for the customer. Appears on invoices emailed to this customer. */ + shipping?: (Partial & { [key: string]: any }) | null; + /** The customer's payment sources, if any. */ + sources: { + /** Details about each object. */ + data: ((Partial & + Partial & + Partial & + Partial & + Partial) & { [key: string]: any })[]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + /** The customer's current subscriptions, if any. */ + subscriptions?: { + /** Details about each object. */ + data: components["schemas"]["subscription"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + /** 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"**. */ + tax_exempt?: ("exempt" | "none" | "reverse") | null; + /** The customer's tax IDs. */ + tax_ids?: { + /** Details about each object. */ + data: components["schemas"]["tax_id"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + customer_acceptance: { + /** The time at which the customer accepted the Mandate. */ + accepted_at?: number | null; + offline?: components["schemas"]["offline_acceptance"]; + online?: components["schemas"]["online_acceptance"]; + /** The type of customer acceptance information included with the Mandate. One of `online` or `offline`. */ + type: "offline" | "online"; + } & { [key: string]: any }; + /** + * 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: { + /** 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; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** The ID of the credit note (if any) related to the transaction. */ + credit_note?: ((Partial & Partial) & { [key: string]: any }) | null; + /** 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; + /** The ID of the customer the transaction belongs to. */ + customer: (Partial & Partial) & { [key: string]: any }; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null; + /** 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; + /** Unique identifier for the object. */ + id: string; + /** The ID of the invoice (if any) related to the transaction. */ + invoice?: ((Partial & Partial) & { [key: string]: any }) | null; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string } | null; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "customer_balance_transaction"; + /** 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. */ + type: + | "adjustment" + | "applied_to_invoice" + | "credit_note" + | "initial" + | "invoice_too_large" + | "invoice_too_small" + | "migration" + | "unapplied_from_invoice" + | "unspent_receiver_credit"; + } & { [key: string]: any }; + deleted_account: { + /** Always true for a deleted object */ + deleted: true; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "account"; + } & { [key: string]: any }; + deleted_alipay_account: { + /** Always true for a deleted object */ + deleted: true; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "alipay_account"; + } & { [key: string]: any }; + deleted_apple_pay_domain: { + /** Always true for a deleted object */ + deleted: true; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "apple_pay_domain"; + } & { [key: string]: any }; + deleted_bank_account: { + /** Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ + currency?: string | null; + /** Always true for a deleted object */ + deleted: true; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "bank_account"; + } & { [key: string]: any }; + deleted_bitcoin_receiver: { + /** Always true for a deleted object */ + deleted: true; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "bitcoin_receiver"; + } & { [key: string]: any }; + deleted_card: { + /** Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ + currency?: string | null; + /** Always true for a deleted object */ + deleted: true; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "card"; + } & { [key: string]: any }; + deleted_coupon: { + /** Always true for a deleted object */ + deleted: true; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "coupon"; + } & { [key: string]: any }; + deleted_customer: { + /** Always true for a deleted object */ + deleted: true; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "customer"; + } & { [key: string]: any }; + deleted_discount: { + /** Always true for a deleted object */ + deleted: true; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "discount"; + } & { [key: string]: any }; + deleted_external_account: (Partial & + Partial) & { [key: string]: any }; + deleted_invoice: { + /** Always true for a deleted object */ + deleted: true; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "invoice"; + } & { [key: string]: any }; + deleted_invoiceitem: { + /** Always true for a deleted object */ + deleted: true; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "invoiceitem"; + } & { [key: string]: any }; + deleted_payment_source: (Partial & + Partial & + Partial & + Partial) & { [key: string]: any }; + deleted_person: { + /** Always true for a deleted object */ + deleted: true; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "person"; + } & { [key: string]: any }; + deleted_plan: { + /** Always true for a deleted object */ + deleted: true; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "plan"; + } & { [key: string]: any }; + deleted_product: { + /** Always true for a deleted object */ + deleted: true; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "product"; + } & { [key: string]: any }; + "deleted_radar.value_list": { + /** Always true for a deleted object */ + deleted: true; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "radar.value_list"; + } & { [key: string]: any }; + "deleted_radar.value_list_item": { + /** Always true for a deleted object */ + deleted: true; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "radar.value_list_item"; + } & { [key: string]: any }; + deleted_recipient: { + /** Always true for a deleted object */ + deleted: true; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "recipient"; + } & { [key: string]: any }; + deleted_sku: { + /** Always true for a deleted object */ + deleted: true; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "sku"; + } & { [key: string]: any }; + deleted_subscription_item: { + /** Always true for a deleted object */ + deleted: true; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "subscription_item"; + } & { [key: string]: any }; + deleted_tax_id: { + /** Always true for a deleted object */ + deleted: true; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "tax_id"; + } & { [key: string]: any }; + "deleted_terminal.location": { + /** Always true for a deleted object */ + deleted: true; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "terminal.location"; + } & { [key: string]: any }; + "deleted_terminal.reader": { + /** Always true for a deleted object */ + deleted: true; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "terminal.reader"; + } & { [key: string]: any }; + deleted_webhook_endpoint: { + /** Always true for a deleted object */ + deleted: true; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "webhook_endpoint"; + } & { [key: string]: any }; + delivery_estimate: { + /** If `type` is `"exact"`, `date` will be the expected delivery date in the format YYYY-MM-DD. */ + date?: string; + /** If `type` is `"range"`, `earliest` will be be the earliest delivery date in the format YYYY-MM-DD. */ + earliest?: string; + /** If `type` is `"range"`, `latest` will be the latest delivery date in the format YYYY-MM-DD. */ + latest?: string; + /** The type of estimate. Must be either `"range"` or `"exact"`. */ + type: string; + } & { [key: string]: any }; + /** + * 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: components["schemas"]["coupon"]; + /** The ID of the customer associated with this discount. */ + customer?: + | ((Partial & + Partial & + Partial) & { [key: string]: any }) + | null; + /** 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; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "discount"; + /** Date that the coupon was applied. */ + start: number; + /** The subscription that this coupon is applied to, if it is applied to a particular subscription. */ + subscription?: string | null; + } & { [key: string]: any }; + /** + * 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: { + /** 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; + /** 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"][]; + /** ID of the charge that was disputed. */ + charge: (Partial & Partial) & { [key: string]: any }; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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"]; + /** Unique identifier for the object. */ + id: string; + /** 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; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "dispute"; + /** ID of the PaymentIntent that was disputed. */ + payment_intent?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** 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; + /** Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `charge_refunded`, `won`, or `lost`. */ + status: + | "charge_refunded" + | "lost" + | "needs_response" + | "under_review" + | "warning_closed" + | "warning_needs_response" + | "warning_under_review" + | "won"; + } & { [key: string]: any }; + dispute_evidence: { + /** 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; + /** The billing address provided by the customer. */ + billing_address?: string | null; + /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. */ + cancellation_policy?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** An explanation of how and when the customer was shown your refund policy prior to purchase. */ + cancellation_policy_disclosure?: string | null; + /** A justification for why the customer's subscription was not canceled. */ + cancellation_rebuttal?: string | null; + /** (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?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** The email address of the customer. */ + customer_email_address?: string | null; + /** The name of the customer. */ + customer_name?: string | null; + /** The IP address that the customer used when making the purchase. */ + customer_purchase_ip?: string | null; + /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. */ + customer_signature?: ((Partial & Partial) & { [key: string]: any }) | null; + /** (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?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. */ + duplicate_charge_explanation?: string | null; + /** The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. */ + duplicate_charge_id?: string | null; + /** A description of the product or service that was sold. */ + product_description?: string | null; + /** (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?: ((Partial & Partial) & { [key: string]: any }) | null; + /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. */ + refund_policy?: ((Partial & Partial) & { [key: string]: any }) | null; + /** Documentation demonstrating that the customer was shown your refund policy prior to purchase. */ + refund_policy_disclosure?: string | null; + /** A justification for why the customer is not entitled to a refund. */ + refund_refusal_explanation?: string | null; + /** The date on which the customer received or began receiving the purchased service, in a clear human-readable format. */ + service_date?: string | null; + /** (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?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** The address to which a physical product was shipped. You should try to include as complete address information as possible. */ + shipping_address?: string | null; + /** 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; + /** The date on which a physical product began its route to the shipping address, in a clear human-readable format. */ + shipping_date?: string | null; + /** (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?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** 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; + /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. */ + uncategorized_file?: ((Partial & Partial) & { [key: string]: any }) | null; + /** Any additional evidence or statements. */ + uncategorized_text?: string | null; + } & { [key: string]: any }; + dispute_evidence_details: { + /** 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; + /** Whether evidence has been staged for this dispute. */ + has_evidence: boolean; + /** 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; + /** The number of times evidence has been submitted. Typically, you may only submit evidence once. */ + submission_count: number; + } & { [key: string]: any }; + ephemeral_key: { + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** Time at which the key will expire. Measured in seconds since the Unix epoch. */ + expires: number; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "ephemeral_key"; + /** The key's secret. You can use this value to make authorized requests to the Stripe API. */ + secret?: string; + } & { [key: string]: any }; + /** An error response from the Stripe API */ + error: { + error: components["schemas"]["api_errors"]; + } & { [key: string]: any }; + /** + * 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: { + /** The connected account that originated the event. */ + account?: string; + /** 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; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + data: components["schemas"]["notification_event_data"]; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "event"; + /** 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; + /** Information on the API request that instigated the event. */ + request?: (Partial & { [key: string]: any }) | null; + /** Description of the event (e.g., `invoice.created` or `charge.refunded`). */ + type: string; + } & { [key: string]: any }; + /** + * `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: { + /** 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; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "exchange_rate"; + /** 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 }; + } & { [key: string]: any }; + external_account: (Partial & Partial) & { + [key: string]: any; + }; + fee: { + /** Amount of the fee, in cents. */ + amount: number; + /** ID of the Connect application that earned the fee. */ + application?: string | null; + /** 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; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null; + /** Type of the fee, one of: `application_fee`, `stripe_fee` or `tax`. */ + type: string; + } & { [key: string]: any }; + /** + * `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: { + /** Amount, in %s. */ + amount: number; + /** Balance transaction that describes the impact on your account balance. */ + balance_transaction?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** ID of the application fee that was refunded. */ + fee: (Partial & Partial) & { [key: string]: any }; + /** Unique identifier for the object. */ + id: 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. */ + metadata: { [key: string]: string }; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "fee_refund"; + } & { [key: string]: any }; + /** + * 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: { + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** A filename for the file, suitable for saving to a filesystem. */ + filename?: string | null; + /** Unique identifier for the object. */ + id: string; + /** A list of [file links](https://stripe.com/docs/api#file_links) that point at this file. */ + links?: + | ({ + /** Details about each object. */ + data: components["schemas"]["file_link"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }) + | null; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "file"; + /** 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; + /** The size in bytes of the file object. */ + size: number; + /** A user friendly title for the document. */ + title?: string | null; + /** The type of the file returned (e.g., `csv`, `pdf`, `jpg`, or `png`). */ + type?: string | null; + /** The URL from which the file can be downloaded using your live secret API key. */ + url?: string | null; + } & { [key: string]: any }; + /** + * 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: { + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** Whether this link is already expired. */ + expired: boolean; + /** Time at which the link expires. */ + expires_at?: number | null; + /** The file object this link points to. */ + file: (Partial & Partial) & { [key: string]: any }; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "file_link"; + /** The publicly accessible URL to download the file. */ + url?: string | null; + } & { [key: string]: any }; + financial_reporting_finance_report_run_run_parameters: { + /** The set of output columns requested for inclusion in the report run. */ + columns?: string[]; + /** Connected account ID by which to filter the report run. */ + connected_account?: string; + /** Currency of objects to be included in the report run. */ + currency?: string; + /** Ending timestamp of data to be included in the report run (exclusive). */ + interval_end?: number; + /** Starting timestamp of data to be included in the report run. */ + interval_start?: number; + /** Payout ID by which to filter the report run. */ + payout?: string; + /** Category of balance transactions to be included in the report run. */ + reporting_category?: string; + /** 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; + } & { [key: string]: any }; + inventory: { + /** The count of inventory available. Will be present if and only if `type` is `finite`. */ + quantity?: number | null; + /** Inventory type. Possible values are `finite`, `bucket` (not quantified), and `infinite`. */ + type: string; + /** 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; + } & { [key: string]: any }; + /** + * 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: { + /** The country of the business associated with this invoice, most often the business creating the invoice. */ + account_country?: string | null; + /** The public name of the business associated with this invoice, most often the business creating the invoice. */ + account_name?: string | null; + /** 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; + /** The amount, in %s, that was paid. */ + amount_paid: number; + /** The amount remaining, in %s, that is due. */ + amount_remaining: number; + /** 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; + /** 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; + /** 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; + /** 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; + /** 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. */ + billing_reason?: + | ( + | "automatic_pending_invoice_item_invoice" + | "manual" + | "subscription" + | "subscription_create" + | "subscription_cycle" + | "subscription_threshold" + | "subscription_update" + | "upcoming" + ) + | null; + /** ID of the latest charge generated for this invoice, if any. */ + charge?: ((Partial & Partial) & { [key: string]: any }) | null; + /** 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. */ + collection_method?: ("charge_automatically" | "send_invoice") | null; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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 fields displayed on the invoice. */ + custom_fields?: components["schemas"]["invoice_setting_custom_field"][] | null; + /** The ID of the customer who will be billed. */ + customer: (Partial & + Partial & + Partial) & { [key: string]: any }; + /** 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?: (Partial & { [key: string]: any }) | null; + /** 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; + /** 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; + /** 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; + /** 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?: (Partial & { [key: string]: any }) | null; + /** 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. */ + customer_tax_exempt?: ("exempt" | "none" | "reverse") | null; + /** 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; + /** 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?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** 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?: + | ((Partial & + Partial & + Partial & + Partial & + Partial & + Partial) & { [key: string]: any }) + | null; + /** The tax rates applied to this invoice, if any. */ + default_tax_rates?: components["schemas"]["tax_rate"][] | null; + /** An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ + description?: string | null; + /** Describes the current discount applied to this invoice, if there is one. */ + discount?: (Partial & { [key: string]: any }) | null; + /** 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; + /** 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; + /** Footer displayed on the invoice. */ + footer?: string | null; + /** 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; + /** Unique identifier for the object. */ + id?: string; + /** 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; + /** 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: { + /** Details about each object. */ + data: components["schemas"]["line_item"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string } | null; + /** 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; + /** 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; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "invoice"; + /** 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; + /** 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?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** End of the usage period during which invoice items were added to this invoice. */ + period_end: number; + /** Start of the usage period during which invoice items were added to this invoice. */ + period_start: number; + /** Total amount of all post-payment credit notes issued for this invoice. */ + post_payment_credit_notes_amount: number; + /** Total amount of all pre-payment credit notes issued for this invoice. */ + pre_payment_credit_notes_amount: number; + /** This is the transaction number that appears on email receipts sent for this invoice. */ + receipt_number?: string | null; + /** 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; + /** Extra information about an invoice for the customer's credit card statement. */ + statement_descriptor?: string | null; + /** 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?: ("deleted" | "draft" | "open" | "paid" | "uncollectible" | "void") | null; + status_transitions: components["schemas"]["invoices_status_transitions"]; + /** The subscription that this invoice was prepared for, if any. */ + subscription?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** Only set for upcoming invoices that preview prorations. The time used to calculate prorations. */ + subscription_proration_date?: number; + /** Total of all subscriptions, invoice items, and prorations on the invoice before any discount or tax is applied. */ + subtotal: number; + /** The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. */ + tax?: number | null; + /** 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 | null; + threshold_reason?: components["schemas"]["invoice_threshold_reason"]; + /** Total after discounts and taxes. */ + total: number; + /** The aggregate amounts calculated per tax rate for all line items. */ + total_tax_amounts?: components["schemas"]["invoice_tax_amount"][] | null; + /** 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; + } & { [key: string]: any }; + invoice_item_threshold_reason: { + /** The IDs of the line items that triggered the threshold invoice. */ + line_item_ids: string[]; + /** The quantity threshold boundary that applied to the given line item. */ + usage_gte: number; + } & { [key: string]: any }; + invoice_line_item_period: { + /** End of the line item's billing period */ + end: number; + /** Start of the line item's billing period */ + start: number; + } & { [key: string]: any }; + invoice_setting_custom_field: { + /** The name of the custom field. */ + name: string; + /** The value of the custom field. */ + value: string; + } & { [key: string]: any }; + invoice_setting_customer_setting: { + /** Default custom fields to be displayed on invoices for this customer. */ + custom_fields?: components["schemas"]["invoice_setting_custom_field"][] | null; + /** 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?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** Default footer to be displayed on invoices for this customer. */ + footer?: string | null; + } & { [key: string]: any }; + invoice_setting_subscription_schedule_setting: { + /** 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; + } & { [key: string]: any }; + invoice_tax_amount: { + /** The amount, in %s, of the tax. */ + amount: number; + /** Whether this tax amount is inclusive or exclusive. */ + inclusive: boolean; + /** The tax rate that was applied to get this tax amount. */ + tax_rate: (Partial & Partial) & { [key: string]: any }; + } & { [key: string]: any }; + invoice_threshold_reason: { + /** The total invoice amount threshold boundary if it triggered the threshold invoice. */ + amount_gte?: number | null; + /** Indicates which line items triggered a threshold invoice. */ + item_reasons: components["schemas"]["invoice_item_threshold_reason"][]; + } & { [key: string]: any }; + /** + * 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: { + /** Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`. */ + amount: number; + /** 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; + /** The ID of the customer who will be billed when this invoice item is billed. */ + customer: (Partial & + Partial & + Partial) & { [key: string]: any }; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + date: number; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null; + /** If true, discounts will apply to this invoice item. Always false for prorations. */ + discountable: boolean; + /** Unique identifier for the object. */ + id: string; + /** The ID of the invoice this invoice item belongs to. */ + invoice?: ((Partial & Partial) & { [key: string]: any }) | null; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "invoiceitem"; + period: components["schemas"]["invoice_line_item_period"]; + /** If the invoice item is a proration, the plan of the subscription that the proration was computed for. */ + plan?: (Partial & { [key: string]: any }) | null; + /** Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. */ + proration: boolean; + /** 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; + /** The subscription that this invoice item has been created for, if any. */ + subscription?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** The subscription item that this invoice item has been created for, if any. */ + subscription_item?: string; + /** 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; + /** Unit Amount (in the `currency` specified) of the invoice item. */ + unit_amount?: number | null; + /** Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. */ + unit_amount_decimal?: string | null; + } & { [key: string]: any }; + invoices_resource_invoice_tax_id: { + /** 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` */ + 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"; + /** The value of the tax ID. */ + value?: string | null; + } & { [key: string]: any }; + invoices_status_transitions: { + /** The time that the invoice draft was finalized. */ + finalized_at?: number | null; + /** The time that the invoice was marked uncollectible. */ + marked_uncollectible_at?: number | null; + /** The time that the invoice was paid. */ + paid_at?: number | null; + /** The time that the invoice was voided. */ + voided_at?: number | null; + } & { [key: string]: any }; + /** + * 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: { + /** 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; + /** ID of the charge this issuer fraud record is for, optionally expanded. */ + charge: (Partial & Partial) & { [key: string]: any }; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** If true, the associated charge is subject to [liability shift](https://stripe.com/docs/payments/3d-secure#disputed-payments). */ + has_liability_shift: boolean; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "issuer_fraud_record"; + /** The timestamp at which the card issuer posted the issuer fraud record. */ + post_date: number; + } & { [key: string]: any }; + /** + * 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": { + /** 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; + /** Whether the authorization has been approved. */ + approved: boolean; + /** How the card details were provided. */ + authorization_method: "chip" | "contactless" | "keyed_in" | "online" | "swipe"; + /** List of balance transactions associated with this authorization. */ + balance_transactions: components["schemas"]["balance_transaction"][]; + card: components["schemas"]["issuing.card"]; + /** The cardholder to whom this authorization belongs. */ + cardholder?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** 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; + /** 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"]; + /** Set of key-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]: string }; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "issuing.authorization"; + /** The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook. */ + pending_request?: + | (Partial & { [key: string]: any }) + | null; + /** 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: components["schemas"]["issuing_authorization_request"][]; + /** The current status of the authorization in its lifecycle. */ + status: "closed" | "pending" | "reversed"; + /** 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"]; + /** What, if any, digital wallet was used for this authorization. One of `apple_pay`, `google_pay`, or `samsung_pay`. */ + wallet?: string | null; + } & { [key: string]: any }; + /** You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) that are issued to cardholders. */ + "issuing.card": { + /** The brand of the card. */ + brand: string; + /** The reason why the card was canceled. */ + cancellation_reason?: ("lost" | "stolen") | null; + cardholder: components["schemas"]["issuing.cardholder"]; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** 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; + /** The expiration month of the card. */ + exp_month: number; + /** The expiration year of the card. */ + exp_year: number; + /** Unique identifier for the object. */ + id: string; + /** The last 4 digits of the card number. */ + last4: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** 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; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "issuing.card"; + /** The latest card that replaces this card, if any. */ + replaced_by?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** The card this card replaces, if any. */ + replacement_for?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** The reason why the previous card needed to be replaced. */ + replacement_reason?: ("damaged" | "expired" | "lost" | "stolen") | null; + /** Where and how the card will be shipped. */ + shipping?: (Partial & { [key: string]: any }) | null; + spending_controls: components["schemas"]["issuing_card_authorization_controls"]; + /** Whether authorizations can be approved on this card. */ + status: "active" | "canceled" | "inactive"; + /** The type of the card. */ + type: "physical" | "virtual"; + } & { [key: string]: any }; + /** + * 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"]; + /** Additional information about a `company` cardholder. */ + company?: (Partial & { [key: string]: any }) | null; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** The cardholder's email address. */ + email?: string | null; + /** Unique identifier for the object. */ + id: string; + /** Additional information about an `individual` cardholder. */ + individual?: (Partial & { [key: string]: any }) | null; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** The cardholder's name. This will be printed on cards issued to them. */ + name: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "issuing.cardholder"; + /** The cardholder's phone number. */ + phone_number?: string | null; + requirements: components["schemas"]["issuing_cardholder_requirements"]; + /** Spending rules that give you some control over how this cardholder's cards can be used. Refer to our [authorizations](https://stripe.com/docs/issuing/purchases/authorizations) documentation for more details. */ + spending_controls?: + | (Partial & { [key: string]: any }) + | null; + /** Specifies whether to permit authorizations on this cardholder's cards. */ + status: "active" | "blocked" | "inactive"; + /** One of `individual` or `company`. */ + type: "company" | "individual"; + } & { [key: string]: any }; + /** + * 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": { + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "issuing.dispute"; + } & { [key: string]: any }; + /** 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": { + /** The Bank Identification Number reflecting this settlement record. */ + bin: string; + /** The date that the transactions are cleared and posted to user's accounts. */ + clearing_date: number; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** Unique identifier for the object. */ + id: string; + /** The total interchange received as reimbursement for the transactions. */ + interchange_fees: number; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** The total net amount required to settle with the network. */ + net_total: number; + /** The card network for this settlement report. One of ["visa"] */ + network: "visa"; + /** The total amount of fees owed to the network. */ + network_fees: number; + /** The Settlement Identification Number assigned by the network. */ + network_settlement_identifier: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "issuing.settlement"; + /** One of `international` or `uk_national_net`. */ + settlement_service: string; + /** The total number of transactions reflected in this settlement. */ + transaction_count: number; + /** The total transaction amount reflected in this settlement. */ + transaction_volume: number; + } & { [key: string]: any }; + /** + * 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": { + /** 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; + /** The `Authorization` object that led to this transaction. */ + authorization?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction. */ + balance_transaction?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** The card used to make this transaction. */ + card: (Partial & Partial) & { [key: string]: any }; + /** The cardholder to whom this transaction belongs. */ + cardholder?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** 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; + /** The currency with which the merchant is taking payment. */ + merchant_currency: string; + merchant_data: components["schemas"]["issuing_authorization_merchant_data"]; + /** Set of key-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]: string }; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "issuing.transaction"; + /** The nature of the transaction. */ + type: "capture" | "refund"; + } & { [key: string]: any }; + issuing_authorization_merchant_data: { + /** 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; + /** City where the seller is located */ + city?: string | null; + /** Country where the seller is located */ + country?: string | null; + /** Name of the seller */ + name?: string | null; + /** Identifier assigned to the seller by the card brand */ + network_id: string; + /** Postal code where the seller is located */ + postal_code?: string | null; + /** State where the seller is located */ + state?: string | null; + } & { [key: string]: any }; + issuing_authorization_pending_request: { + /** 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; + /** 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; + /** 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; + /** 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; + /** The local currency the merchant is requesting to authorize. */ + merchant_currency: string; + } & { [key: string]: any }; + issuing_authorization_request: { + /** 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; + /** Whether this request was approved. */ + approved: boolean; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** 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; + /** 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; + /** The reason for the approval or decline. */ + 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"; + } & { [key: string]: any }; + issuing_authorization_verification_data: { + /** Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. */ + address_line1_check: "match" | "mismatch" | "not_provided"; + /** Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`. */ + address_postal_code_check: "match" | "mismatch" | "not_provided"; + /** Whether the cardholder provided a CVC and if it matched Stripe’s record. */ + cvc_check: "match" | "mismatch" | "not_provided"; + /** Whether the cardholder provided an expiry date and if it matched Stripe’s record. */ + expiry_check: "match" | "mismatch" | "not_provided"; + } & { [key: string]: any }; + issuing_card_authorization_controls: { + /** 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" + )[] + | null; + /** 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" + )[] + | null; + /** Limit the spending with rules based on time intervals and categories. */ + spending_limits?: components["schemas"]["issuing_card_spending_limit"][] | null; + /** Currency for the amounts within spending_limits. Locked to the currency of the card. */ + spending_limits_currency?: string | null; + } & { [key: string]: any }; + issuing_card_shipping: { + address: components["schemas"]["address"]; + /** The delivery company that shipped a card. */ + carrier?: ("fedex" | "usps") | null; + /** A unix timestamp representing a best estimate of when the card will be delivered. */ + eta?: number | null; + /** Recipient name. */ + name: string; + /** Shipment service, such as `standard` or `express`. */ + service: "express" | "priority" | "standard"; + /** The delivery status of the card. */ + status?: ("canceled" | "delivered" | "failure" | "pending" | "returned" | "shipped") | null; + /** A tracking number for a card shipment. */ + tracking_number?: string | null; + /** A link to the shipping carrier's site where you can view detailed information about a card shipment. */ + tracking_url?: string | null; + /** Packaging options. */ + type: "bulk" | "individual"; + } & { [key: string]: any }; + issuing_card_spending_limit: { + /** Maximum amount allowed to spend per time interval. */ + amount: number; + /** 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" + )[] + | null; + /** The time interval or event with which to apply this spending limit towards. */ + interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; + } & { [key: string]: any }; + issuing_cardholder_address: { + address: components["schemas"]["address"]; + } & { [key: string]: any }; + issuing_cardholder_authorization_controls: { + /** 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" + )[] + | null; + /** 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" + )[] + | null; + /** Limit the spending with rules based on time intervals and categories. */ + spending_limits?: components["schemas"]["issuing_cardholder_spending_limit"][] | null; + /** Currency for the amounts within spending_limits. */ + spending_limits_currency?: string | null; + } & { [key: string]: any }; + issuing_cardholder_company: { + /** Whether the company's business ID number was provided. */ + tax_id_provided: boolean; + } & { [key: string]: any }; + issuing_cardholder_id_document: { + /** 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?: ((Partial & Partial) & { [key: string]: any }) | null; + /** 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?: ((Partial & Partial) & { [key: string]: any }) | null; + } & { [key: string]: any }; + issuing_cardholder_individual: { + /** The date of birth of this cardholder. */ + dob?: (Partial & { [key: string]: any }) | null; + /** The first name of this cardholder. */ + first_name: string; + /** The last name of this cardholder. */ + last_name: string; + /** Government-issued ID document for this cardholder. */ + verification?: + | (Partial & { [key: string]: any }) + | null; + } & { [key: string]: any }; + issuing_cardholder_individual_dob: { + /** The day of birth, between 1 and 31. */ + day?: number | null; + /** The month of birth, between 1 and 12. */ + month?: number | null; + /** The four-digit year of birth. */ + year?: number | null; + } & { [key: string]: any }; + issuing_cardholder_requirements: { + /** If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason. */ + disabled_reason?: ("listed" | "rejected.listed" | "under_review") | null; + /** 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; + } & { [key: string]: any }; + issuing_cardholder_spending_limit: { + /** Maximum amount allowed to spend per time interval. */ + amount: number; + /** 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" + )[] + | null; + /** The time interval or event with which to apply this spending limit towards. */ + interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; + } & { [key: string]: any }; + issuing_cardholder_verification: { + /** An identifying document, either a passport or local ID card. */ + document?: (Partial & { [key: string]: any }) | null; + } & { [key: string]: any }; + legal_entity_company: { + address?: components["schemas"]["address"]; + /** The Kana variation of the company's primary address (Japan only). */ + address_kana?: (Partial & { [key: string]: any }) | null; + /** The Kanji variation of the company's primary address (Japan only). */ + address_kanji?: (Partial & { [key: string]: any }) | null; + /** 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; + /** 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; + /** The company's legal name. */ + name?: string | null; + /** The Kana variation of the company's legal name (Japan only). */ + name_kana?: string | null; + /** The Kanji variation of the company's legal name (Japan only). */ + name_kanji?: string | null; + /** 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; + /** The company's phone number (used for verification). */ + phone?: string | null; + /** 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. */ + 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"; + /** Whether the company's business ID number was provided. */ + tax_id_provided?: boolean; + /** The jurisdiction in which the `tax_id` is registered (Germany-based companies only). */ + tax_id_registrar?: string; + /** Whether the company's business VAT number was provided. */ + vat_id_provided?: boolean; + /** Information on the verification state of the company. */ + verification?: + | (Partial & { [key: string]: any }) + | null; + } & { [key: string]: any }; + legal_entity_company_verification: { + document: components["schemas"]["legal_entity_company_verification_document"]; + } & { [key: string]: any }; + legal_entity_company_verification_document: { + /** 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?: ((Partial & Partial) & { [key: string]: any }) | null; + /** A user-displayable string describing the verification state of this document. */ + details?: string | null; + /** 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; + /** 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?: ((Partial & Partial) & { [key: string]: any }) | null; + } & { [key: string]: any }; + legal_entity_dob: { + /** The day of birth, between 1 and 31. */ + day?: number | null; + /** The month of birth, between 1 and 12. */ + month?: number | null; + /** The four-digit year of birth. */ + year?: number | null; + } & { [key: string]: any }; + legal_entity_japan_address: { + /** City/Ward. */ + city?: string | null; + /** Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country?: string | null; + /** Block/Building number. */ + line1?: string | null; + /** Building details. */ + line2?: string | null; + /** ZIP or postal code. */ + postal_code?: string | null; + /** Prefecture. */ + state?: string | null; + /** Town/cho-me. */ + town?: string | null; + } & { [key: string]: any }; + legal_entity_person_verification: { + /** A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. */ + additional_document?: + | (Partial & { [key: string]: any }) + | null; + /** 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; + /** 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"]; + /** The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`. */ + status: string; + } & { [key: string]: any }; + legal_entity_person_verification_document: { + /** 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?: ((Partial & Partial) & { [key: string]: any }) | null; + /** 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; + /** 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; + /** 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?: ((Partial & Partial) & { [key: string]: any }) | null; + } & { [key: string]: any }; + light_account_logout: { [key: string]: any }; + line_item: { + /** The amount, in %s. */ + amount: number; + /** 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; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null; + /** If true, discounts will apply to this line item. Always false for prorations. */ + discountable: boolean; + /** Unique identifier for the object. */ + id: string; + /** The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any. */ + invoice_item?: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "line_item"; + period: components["schemas"]["invoice_line_item_period"]; + /** The plan of the subscription, if the line item is a subscription or a proration. */ + plan?: (Partial & { [key: string]: any }) | null; + /** Whether this is a proration. */ + proration: boolean; + /** The quantity of the subscription, if the line item is a subscription or a proration. */ + quantity?: number | null; + /** The subscription that the invoice item pertains to, if any. */ + subscription?: string | null; + /** 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; + /** The amount of tax calculated per tax rate for this line item */ + tax_amounts?: components["schemas"]["invoice_tax_amount"][] | null; + /** The tax rates which apply to the line item. */ + tax_rates?: components["schemas"]["tax_rate"][] | null; + /** A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`. */ + type: "invoiceitem" | "subscription"; + } & { [key: string]: any }; + login_link: { + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "login_link"; + /** The URL for the login link. */ + url: string; + } & { [key: string]: any }; + /** 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"]; + /** Unique identifier for the object. */ + id: string; + /** 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"]; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "mandate"; + /** ID of the payment method associated with this mandate. */ + payment_method: (Partial & Partial) & { [key: string]: any }; + payment_method_details: components["schemas"]["mandate_payment_method_details"]; + single_use?: components["schemas"]["mandate_single_use"]; + /** The status of the mandate, which indicates whether it can be used to initiate a payment. */ + status: "active" | "inactive" | "pending"; + /** The type of the mandate. */ + type: "multi_use" | "single_use"; + } & { [key: string]: any }; + mandate_au_becs_debit: { + /** The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. */ + url: string; + } & { [key: string]: any }; + mandate_multi_use: { [key: string]: any }; + mandate_payment_method_details: { + au_becs_debit?: components["schemas"]["mandate_au_becs_debit"]; + card?: components["schemas"]["card_mandate_payment_method_details"]; + sepa_debit?: components["schemas"]["mandate_sepa_debit"]; + /** 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; + } & { [key: string]: any }; + mandate_sepa_debit: { + /** The unique reference of the mandate. */ + reference: string; + /** The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. */ + url: string; + } & { [key: string]: any }; + mandate_single_use: { + /** On a single use mandate, the amount of the payment. */ + amount: number; + /** On a single use mandate, the currency of the payment. */ + currency: string; + } & { [key: string]: any }; + notification_event_data: { + /** 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]: any }; + /** Object containing the names of the attributes that have changed, and their previous values (sent along only with *.updated events). */ + previous_attributes?: { [key: string]: any }; + } & { [key: string]: any }; + notification_event_request: { + /** 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; + /** 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; + } & { [key: string]: any }; + offline_acceptance: { [key: string]: any }; + online_acceptance: { + /** The IP address from which the Mandate was accepted by the customer. */ + ip_address?: string | null; + /** The user agent of the browser from which the Mandate was accepted by the customer. */ + user_agent?: string | null; + } & { [key: string]: any }; + /** + * 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: { + /** 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; + /** The total amount that was returned to the customer. */ + amount_returned?: number | null; + /** ID of the Connect Application that created the order. */ + application?: string | null; + /** 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; + /** The ID of the payment used to pay for the order. Present if the order status is `paid`, `fulfilled`, or `refunded`. */ + charge?: ((Partial & Partial) & { [key: string]: any }) | null; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** The customer used for the order. */ + customer?: + | ((Partial & + Partial & + Partial) & { [key: string]: any }) + | null; + /** The email address of the customer placing the order. */ + email?: string | null; + /** External coupon code to load for this order. */ + external_coupon_code?: string; + /** Unique identifier for the object. */ + id: string; + /** List of items constituting the order. An order can have up to 25 items. */ + items: components["schemas"]["order_item"][]; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "order"; + /** A list of returns that have taken place for this order. */ + returns?: + | ({ + /** Details about each object. */ + data: components["schemas"]["order_return"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }) + | null; + /** 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; + /** The shipping address for the order. Present if the order is for goods to be shipped. */ + shipping?: (Partial & { [key: string]: any }) | null; + /** 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; + /** 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; + /** The timestamps at which the order status was updated. */ + status_transitions?: (Partial & { [key: string]: any }) | null; + /** Time at which the object was last updated. Measured in seconds since the Unix epoch. */ + updated?: number | null; + /** The user's order ID if it is different from the Stripe order ID. */ + upstream_id?: string; + } & { [key: string]: any }; + /** + * 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: { + /** 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; + /** 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 of the line item, meant to be displayable to the user (e.g., `"Express shipping"`). */ + description: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "order_item"; + /** The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). */ + parent?: ((Partial & Partial) & { [key: string]: any }) | null; + /** 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; + /** The type of line item. One of `sku`, `tax`, `shipping`, or `discount`. */ + type: string; + } & { [key: string]: any }; + /** + * 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: { + /** 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; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** Unique identifier for the object. */ + id: string; + /** The items included in this order return. */ + items: components["schemas"]["order_item"][]; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "order_return"; + /** The order that this return includes items from. */ + order?: ((Partial & Partial) & { [key: string]: any }) | null; + /** The ID of the refund issued for this return. */ + refund?: ((Partial & Partial) & { [key: string]: any }) | null; + } & { [key: string]: any }; + package_dimensions: { + /** Height, in inches. */ + height: number; + /** Length, in inches. */ + length: number; + /** Weight, in ounces. */ + weight: number; + /** Width, in inches. */ + width: number; + } & { [key: string]: any }; + /** + * 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: { + /** 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; + /** Amount that can be captured from this PaymentIntent. */ + amount_capturable?: number; + /** Amount that was collected by this PaymentIntent. */ + amount_received?: number; + /** ID of the Connect application that created the PaymentIntent. */ + application?: ((Partial & Partial) & { [key: string]: any }) | null; + /** 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 | null; + /** 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; + /** 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`). */ + cancellation_reason?: + | ( + | "abandoned" + | "automatic" + | "duplicate" + | "failed_invoice" + | "fraudulent" + | "requested_by_customer" + | "void_invoice" + ) + | null; + /** Controls when the funds will be captured from the customer's account. */ + capture_method: "automatic" | "manual"; + /** Charges that were created by this PaymentIntent, if any. */ + charges?: { + /** 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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + /** + * 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 | null; + confirmation_method: "automatic" | "manual"; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** + * 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?: + | ((Partial & + Partial & + Partial) & { [key: string]: any }) + | null; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null; + /** Unique identifier for the object. */ + id: string; + /** ID of the invoice that created this PaymentIntent, if it exists. */ + invoice?: ((Partial & Partial) & { [key: string]: any }) | null; + /** 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?: (Partial & { [key: string]: any }) | null; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** 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?: (Partial & { [key: string]: any }) | null; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "payment_intent"; + /** 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?: ((Partial & Partial) & { [key: string]: any }) | null; + /** ID of the payment method used in this PaymentIntent. */ + payment_method?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** Payment-method-specific configuration for this PaymentIntent. */ + payment_method_options?: + | (Partial & { [key: string]: any }) + | null; + /** The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ + payment_method_types: string[]; + /** Email address that the receipt for the resulting payment will be sent to. */ + receipt_email?: string | null; + /** ID of the review associated with this PaymentIntent, if any. */ + review?: ((Partial & Partial) & { [key: string]: any }) | null; + /** + * 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). + */ + setup_future_usage?: ("off_session" | "on_session") | null; + /** Shipping information for this PaymentIntent. */ + shipping?: (Partial & { [key: string]: any }) | null; + /** 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; + /** 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; + /** 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). */ + status: + | "canceled" + | "processing" + | "requires_action" + | "requires_capture" + | "requires_confirmation" + | "requires_payment_method" + | "succeeded"; + /** 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?: (Partial & { [key: string]: any }) | null; + /** 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; + } & { [key: string]: any }; + payment_intent_next_action: { + redirect_to_url?: components["schemas"]["payment_intent_next_action_redirect_to_url"]; + /** Type of the next action to perform, one of `redirect_to_url` or `use_stripe_sdk`. */ + type: string; + /** 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]: any }; + } & { [key: string]: any }; + payment_intent_next_action_redirect_to_url: { + /** If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ + return_url?: string | null; + /** The URL you must redirect your customer to in order to authenticate the payment. */ + url?: string | null; + } & { [key: string]: any }; + payment_intent_payment_method_options: { + card?: components["schemas"]["payment_intent_payment_method_options_card"]; + } & { [key: string]: any }; + payment_intent_payment_method_options_card: { + /** + * Installment details for this payment (Mexico only). + * + * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + */ + installments?: + | (Partial & { [key: string]: any }) + | null; + /** 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. */ + request_three_d_secure?: ("any" | "automatic" | "challenge_only") | null; + } & { [key: string]: any }; + /** + * 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?: components["schemas"]["payment_method_au_becs_debit"]; + billing_details: components["schemas"]["billing_details"]; + card?: components["schemas"]["payment_method_card"]; + card_present?: components["schemas"]["payment_method_card_present"]; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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?: ((Partial & Partial) & { [key: string]: any }) | null; + fpx?: components["schemas"]["payment_method_fpx"]; + /** Unique identifier for the object. */ + id: string; + ideal?: components["schemas"]["payment_method_ideal"]; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "payment_method"; + sepa_debit?: components["schemas"]["payment_method_sepa_debit"]; + /** 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. */ + type: "au_becs_debit" | "card" | "fpx" | "ideal" | "sepa_debit"; + } & { [key: string]: any }; + payment_method_au_becs_debit: { + /** Six-digit number identifying bank and branch associated with this bank account. */ + bsb_number?: string | null; + /** Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null; + /** Last four digits of the bank account number. */ + last4?: string | null; + } & { [key: string]: any }; + payment_method_card: { + /** Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + brand: string; + /** Checks on Card address and CVC if provided. */ + checks?: (Partial & { [key: string]: any }) | null; + /** 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; + /** Two-digit number representing the card's expiration month. */ + exp_month: number; + /** Four-digit number representing the card's expiration year. */ + exp_year: number; + /** 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 | null; + /** Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding: string; + /** Details of the original PaymentMethod that created this object. */ + generated_from?: + | (Partial & { [key: string]: any }) + | null; + /** The last four digits of the card. */ + last4: string; + /** Contains details on how this Card maybe be used for 3D Secure authentication. */ + three_d_secure_usage?: (Partial & { [key: string]: any }) | null; + /** If this Card is part of a card wallet, this contains the details of the card wallet. */ + wallet?: (Partial & { [key: string]: any }) | null; + } & { [key: string]: any }; + payment_method_card_checks: { + /** If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_line1_check?: string | null; + /** If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_postal_code_check?: string | null; + /** If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + cvc_check?: string | null; + } & { [key: string]: any }; + payment_method_card_generated_card: { + /** The charge that created this object. */ + charge?: string | null; + /** Transaction-specific details of the payment method used in the payment. */ + payment_method_details?: + | (Partial & { [key: string]: any }) + | null; + } & { [key: string]: any }; + payment_method_card_present: { [key: string]: any }; + 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"]; + /** (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"]; + /** 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. */ + type: "amex_express_checkout" | "apple_pay" | "google_pay" | "masterpass" | "samsung_pay" | "visa_checkout"; + visa_checkout?: components["schemas"]["payment_method_card_wallet_visa_checkout"]; + } & { [key: string]: any }; + payment_method_card_wallet_amex_express_checkout: { [key: string]: any }; + payment_method_card_wallet_apple_pay: { [key: string]: any }; + payment_method_card_wallet_google_pay: { [key: string]: any }; + payment_method_card_wallet_masterpass: { + /** 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?: (Partial & { [key: string]: any }) | null; + /** 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; + /** 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; + /** 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?: (Partial & { [key: string]: any }) | null; + } & { [key: string]: any }; + payment_method_card_wallet_samsung_pay: { [key: string]: any }; + payment_method_card_wallet_visa_checkout: { + /** 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?: (Partial & { [key: string]: any }) | null; + /** 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; + /** 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; + /** 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?: (Partial & { [key: string]: any }) | null; + } & { [key: string]: any }; + payment_method_details: { + ach_credit_transfer?: components["schemas"]["payment_method_details_ach_credit_transfer"]; + ach_debit?: components["schemas"]["payment_method_details_ach_debit"]; + alipay?: components["schemas"]["payment_method_details_alipay"]; + au_becs_debit?: components["schemas"]["payment_method_details_au_becs_debit"]; + bancontact?: components["schemas"]["payment_method_details_bancontact"]; + 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"]; + ideal?: components["schemas"]["payment_method_details_ideal"]; + klarna?: components["schemas"]["payment_method_details_klarna"]; + multibanco?: components["schemas"]["payment_method_details_multibanco"]; + 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"]; + /** + * 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?: components["schemas"]["payment_method_details_wechat"]; + } & { [key: string]: any }; + payment_method_details_ach_credit_transfer: { + /** Account number to transfer funds to. */ + account_number?: string | null; + /** Name of the bank associated with the routing number. */ + bank_name?: string | null; + /** Routing transit number for the bank account to transfer funds to. */ + routing_number?: string | null; + /** SWIFT code of the bank associated with the routing number. */ + swift_code?: string | null; + } & { [key: string]: any }; + payment_method_details_ach_debit: { + /** Type of entity that holds the account. This can be either `individual` or `company`. */ + account_holder_type?: ("company" | "individual") | null; + /** Name of the bank associated with the bank account. */ + bank_name?: string | null; + /** Two-letter ISO code representing the country the bank account is located in. */ + country?: string | null; + /** Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null; + /** Last four digits of the bank account number. */ + last4?: string | null; + /** Routing transit number of the bank account. */ + routing_number?: string | null; + } & { [key: string]: any }; + payment_method_details_alipay: { [key: string]: any }; + payment_method_details_au_becs_debit: { + /** Bank-State-Branch number of the bank account. */ + bsb_number?: string | null; + /** Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null; + /** Last four digits of the bank account number. */ + last4?: string | null; + /** ID of the mandate used to make this payment. */ + mandate?: string; + } & { [key: string]: any }; + payment_method_details_bancontact: { + /** Bank code of bank associated with the bank account. */ + bank_code?: string | null; + /** Name of the bank associated with the bank account. */ + bank_name?: string | null; + /** Bank Identifier Code of the bank associated with the bank account. */ + bic?: string | null; + /** Last four characters of the IBAN. */ + iban_last4?: string | null; + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + * Can be one of `en`, `de`, `fr`, or `nl` + */ + preferred_language?: ("de" | "en" | "fr" | "nl") | null; + /** + * 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; + } & { [key: string]: any }; + payment_method_details_card: { + /** Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + brand?: string | null; + /** Check results by Card networks on Card address and CVC at time of payment. */ + checks?: (Partial & { [key: string]: any }) | null; + /** 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; + /** Two-digit number representing the card's expiration month. */ + exp_month?: number | null; + /** Four-digit number representing the card's expiration year. */ + exp_year?: number | null; + /** 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 | null; + /** Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding?: string | null; + /** + * Installment details for this payment (Mexico only). + * + * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + */ + installments?: + | (Partial & { [key: string]: any }) + | null; + /** The last four digits of the card. */ + last4?: string | null; + /** Identifies which network this charge was processed on. Can be `amex`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + network?: string | null; + /** Populated if this transaction used 3D Secure authentication. */ + three_d_secure?: (Partial & { [key: string]: any }) | null; + /** If this Card is part of a card wallet, this contains the details of the card wallet. */ + wallet?: (Partial & { [key: string]: any }) | null; + } & { [key: string]: any }; + payment_method_details_card_checks: { + /** If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_line1_check?: string | null; + /** If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + address_postal_code_check?: string | null; + /** If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ + cvc_check?: string | null; + } & { [key: string]: any }; + payment_method_details_card_installments: { + /** Installment plan selected for the payment. */ + plan?: + | (Partial & { [key: string]: any }) + | null; + } & { [key: string]: any }; + payment_method_details_card_installments_plan: { + /** For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. */ + count?: number | null; + /** + * For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + * One of `month`. + */ + interval?: "month" | null; + /** Type of installment plan, one of `fixed_count`. */ + type: "fixed_count"; + } & { [key: string]: any }; + payment_method_details_card_present: { + /** Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + brand?: string | null; + /** 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 | null; + /** 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; + /** Authorization response cryptogram. */ + emv_auth_data?: string | null; + /** Two-digit number representing the card's expiration month. */ + exp_month?: number | null; + /** Four-digit number representing the card's expiration year. */ + exp_year?: number | null; + /** 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 | null; + /** Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding?: string | null; + /** 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; + /** The last four digits of the card. */ + last4?: string | null; + /** Identifies which network this charge was processed on. Can be `amex`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + network?: string | null; + /** 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 | null; + /** A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ + receipt?: + | (Partial & { [key: string]: any }) + | null; + } & { [key: string]: any }; + payment_method_details_card_present_receipt: { + /** EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ + application_cryptogram?: string | null; + /** Mnenomic of the Application Identifier. */ + application_preferred_name?: string | null; + /** Identifier for this transaction. */ + authorization_code?: string | null; + /** EMV tag 8A. A code returned by the card issuer. */ + authorization_response_code?: string | null; + /** How the cardholder verified ownership of the card. */ + cardholder_verification_method?: string | null; + /** EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. */ + dedicated_file_name?: string | null; + /** The outcome of a series of EMV functions performed by the card reader. */ + terminal_verification_results?: string | null; + /** An indication of various EMV functions performed during the transaction. */ + transaction_status_information?: string | null; + } & { [key: string]: any }; + 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"]; + /** (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"]; + /** 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. */ + type: "amex_express_checkout" | "apple_pay" | "google_pay" | "masterpass" | "samsung_pay" | "visa_checkout"; + visa_checkout?: components["schemas"]["payment_method_details_card_wallet_visa_checkout"]; + } & { [key: string]: any }; + payment_method_details_card_wallet_amex_express_checkout: { [key: string]: any }; + payment_method_details_card_wallet_apple_pay: { [key: string]: any }; + payment_method_details_card_wallet_google_pay: { [key: string]: any }; + payment_method_details_card_wallet_masterpass: { + /** 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?: (Partial & { [key: string]: any }) | null; + /** 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; + /** 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; + /** 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?: (Partial & { [key: string]: any }) | null; + } & { [key: string]: any }; + payment_method_details_card_wallet_samsung_pay: { [key: string]: any }; + payment_method_details_card_wallet_visa_checkout: { + /** 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?: (Partial & { [key: string]: any }) | null; + /** 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; + /** 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; + /** 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?: (Partial & { [key: string]: any }) | null; + } & { [key: string]: any }; + payment_method_details_eps: { + /** + * 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 | null; + } & { [key: string]: any }; + payment_method_details_fpx: { + /** 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`. */ + 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"; + /** Unique transaction id generated by FPX for every request from the merchant */ + transaction_id?: string | null; + } & { [key: string]: any }; + payment_method_details_giropay: { + /** Bank code of bank associated with the bank account. */ + bank_code?: string | null; + /** Name of the bank associated with the bank account. */ + bank_name?: string | null; + /** Bank Identifier Code of the bank associated with the bank account. */ + bic?: string | null; + /** + * 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 | null; + } & { [key: string]: any }; + payment_method_details_ideal: { + /** 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`. */ + bank?: + | ( + | "abn_amro" + | "asn_bank" + | "bunq" + | "handelsbanken" + | "ing" + | "knab" + | "moneyou" + | "rabobank" + | "regiobank" + | "sns_bank" + | "triodos_bank" + | "van_lanschot" + ) + | null; + /** The Bank Identifier Code of the customer's bank. */ + bic?: + | ( + | "ABNANL2A" + | "ASNBNL21" + | "BUNQNL2A" + | "FVLBNL22" + | "HANDNL2A" + | "INGBNL2A" + | "KNABNL2H" + | "MOYONL21" + | "RABONL2U" + | "RBRBNL21" + | "SNSBNL2A" + | "TRIONL2U" + ) + | null; + /** Last four characters of the IBAN. */ + iban_last4?: string | null; + /** + * 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; + } & { [key: string]: any }; + payment_method_details_klarna: { [key: string]: any }; + payment_method_details_multibanco: { + /** Entity number associated with this Multibanco payment. */ + entity?: string | null; + /** Reference number associated with this Multibanco payment. */ + reference?: string | null; + } & { [key: string]: any }; + payment_method_details_p24: { + /** Unique reference for this Przelewy24 payment. */ + reference?: string | null; + /** + * 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 | null; + } & { [key: string]: any }; + payment_method_details_sepa_debit: { + /** Bank code of bank associated with the bank account. */ + bank_code?: string | null; + /** Branch code of bank associated with the bank account. */ + branch_code?: string | null; + /** Two-letter ISO code representing the country the bank account is located in. */ + country?: string | null; + /** Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null; + /** Last four characters of the IBAN. */ + last4?: string | null; + /** ID of the mandate used to make this payment. */ + mandate?: string | null; + } & { [key: string]: any }; + payment_method_details_sofort: { + /** Bank code of bank associated with the bank account. */ + bank_code?: string | null; + /** Name of the bank associated with the bank account. */ + bank_name?: string | null; + /** Bank Identifier Code of the bank associated with the bank account. */ + bic?: string | null; + /** Two-letter ISO code representing the country the bank account is located in. */ + country?: string | null; + /** Last four characters of the IBAN. */ + iban_last4?: string | null; + /** + * 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; + } & { [key: string]: any }; + payment_method_details_stripe_account: { [key: string]: any }; + payment_method_details_wechat: { [key: string]: any }; + payment_method_fpx: { + /** 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`. */ + 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"; + } & { [key: string]: any }; + payment_method_ideal: { + /** 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`. */ + bank?: + | ( + | "abn_amro" + | "asn_bank" + | "bunq" + | "handelsbanken" + | "ing" + | "knab" + | "moneyou" + | "rabobank" + | "regiobank" + | "sns_bank" + | "triodos_bank" + | "van_lanschot" + ) + | null; + /** The Bank Identifier Code of the customer's bank, if the bank was provided. */ + bic?: + | ( + | "ABNANL2A" + | "ASNBNL21" + | "BUNQNL2A" + | "FVLBNL22" + | "HANDNL2A" + | "INGBNL2A" + | "KNABNL2H" + | "MOYONL21" + | "RABONL2U" + | "RBRBNL21" + | "SNSBNL2A" + | "TRIONL2U" + ) + | null; + } & { [key: string]: any }; + payment_method_options_card_installments: { + /** Installment plans that may be selected for this PaymentIntent. */ + available_plans?: components["schemas"]["payment_method_details_card_installments_plan"][] | null; + /** Whether Installments are enabled for this PaymentIntent. */ + enabled: boolean; + /** Installment plan selected for this PaymentIntent. */ + plan?: + | (Partial & { [key: string]: any }) + | null; + } & { [key: string]: any }; + payment_method_sepa_debit: { + /** Bank code of bank associated with the bank account. */ + bank_code?: string | null; + /** Branch code of bank associated with the bank account. */ + branch_code?: string | null; + /** Two-letter ISO code representing the country the bank account is located in. */ + country?: string | null; + /** Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null; + /** Last four characters of the IBAN. */ + last4?: string | null; + } & { [key: string]: any }; + payment_pages_payment_page_resources_shipping_address_collection: { + /** + * 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" + )[]; + } & { [key: string]: any }; + payment_source: (Partial & + Partial & + Partial & + Partial & + Partial & + Partial) & { [key: string]: any }; + /** + * 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: { + /** Amount (in %s) to be transferred to your bank account or debit card. */ + amount: number; + /** Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank holidays. */ + arrival_date: number; + /** 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; + /** ID of the balance transaction that describes the impact of this payout on your account balance. */ + balance_transaction?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null; + /** ID of the bank account or card the payout was sent to. */ + destination?: + | ((Partial & + Partial & + Partial & + Partial & + Partial) & { [key: string]: any }) + | null; + /** 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?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** 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; + /** Message to user further explaining reason for payout failure if available. */ + failure_message?: string | null; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** 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; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "payout"; + /** The source balance this payout came from. One of `card`, `fpx`, or `bank_account`. */ + source_type: string; + /** Extra information about a payout to be displayed on the user's bank statement. */ + statement_descriptor?: string | null; + /** 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; + /** Can be `bank_account` or `card`. */ + type: "bank_account" | "card"; + } & { [key: string]: any }; + period: { + /** The end date of this usage period. All usage up to and including this point in time is included. */ + end?: number | null; + /** The start date of this usage period. All usage after this point in time is included. */ + start?: number | null; + } & { [key: string]: any }; + /** + * 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?: components["schemas"]["address"]; + address_kana?: (Partial & { [key: string]: any }) | null; + address_kanji?: (Partial & { [key: string]: any }) | null; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + dob?: components["schemas"]["legal_entity_dob"]; + email?: string | null; + first_name?: string | null; + first_name_kana?: string | null; + first_name_kanji?: string | null; + gender?: string | null; + /** Unique identifier for the object. */ + id: string; + id_number_provided?: boolean; + last_name?: string | null; + last_name_kana?: string | null; + last_name_kanji?: string | null; + maiden_name?: string | null; + /** Set of key-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]: string }; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "person"; + phone?: string | null; + relationship?: components["schemas"]["person_relationship"]; + requirements?: (Partial & { [key: string]: any }) | null; + ssn_last_4_provided?: boolean; + verification?: components["schemas"]["legal_entity_person_verification"]; + } & { [key: string]: any }; + person_relationship: { + /** 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 | null; + /** Whether the person has significant responsibility to control, manage, or direct the organization. */ + executive?: boolean | null; + /** Whether the person is an owner of the account’s legal entity. */ + owner?: boolean | null; + /** The percent owned by the person of the account's legal entity. */ + percent_ownership?: number | null; + /** 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; + /** The person's title (e.g., CEO, Support Engineer). */ + title?: string | null; + } & { [key: string]: any }; + person_requirements: { + /** 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[]; + /** The fields that need to be collected again because validation or verification failed for some reason. */ + errors: components["schemas"]["account_requirements_error"][]; + /** 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[]; + /** 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[]; + /** 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[]; + } & { [key: string]: any }; + /** + * Plans define the base price, currency, and billing cycle for subscriptions. + * For example, you might have a $5/month plan + * that provides limited access to your products, and a + * $15/month plan that allows full access. + * + * 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: { + /** Whether the plan can be used for new purchases. */ + active: boolean; + /** 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`. */ + aggregate_usage?: ("last_during_period" | "last_ever" | "max" | "sum") | null; + /** The amount in %s to be charged on the interval specified. */ + amount?: number | null; + /** Same as `amount`, but contains a decimal value with at most 12 decimal places. */ + amount_decimal?: string | null; + /** 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. */ + billing_scheme: "per_unit" | "tiered"; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** Unique identifier for the object. */ + id: string; + /** The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. */ + interval: "day" | "month" | "week" | "year"; + /** 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; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** A brief description of the plan, hidden from customers. */ + nickname?: string | null; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "plan"; + /** The product whose pricing this plan determines. */ + product?: + | ((Partial & + Partial & + Partial) & { [key: string]: any }) + | null; + /** 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"][] | null; + /** 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. */ + tiers_mode?: ("graduated" | "volume") | null; + /** Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. */ + transform_usage?: (Partial & { [key: string]: any }) | null; + /** 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; + /** 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`. */ + usage_type: "licensed" | "metered"; + } & { [key: string]: any }; + plan_tier: { + /** Price for the entire tier. */ + flat_amount?: number | null; + /** Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. */ + flat_amount_decimal?: string | null; + /** Per unit price for units relevant to the tier. */ + unit_amount?: number | null; + /** Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. */ + unit_amount_decimal?: string | null; + /** Up to and including to this quantity will be contained in the tier. */ + up_to?: number | null; + } & { [key: string]: any }; + platform_tax_fee: { + /** The Connected account that incurred this charge. */ + account: string; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "platform_tax_fee"; + /** The payment object that caused this tax to be inflicted. */ + source_transaction: string; + /** The type of tax (VAT). */ + type: string; + } & { [key: string]: any }; + /** + * Store representations of products you sell in `Product` objects, used in + * conjunction with [SKUs](https://stripe.com/docs/api#skus). Products may be physical goods, to be shipped, or + * digital. + * + * Documentation on `Product`s for use with `Subscription`s can be found at + * [Subscription Products](https://stripe.com/docs/api#service_products). + * + * Related guide: [Define products and SKUs](https://stripe.com/docs/orders#define-products-skus) + */ + product: { + /** Whether the product is currently available for purchase. */ + active: boolean; + /** A list of up to 5 attributes that each SKU can provide values for (e.g., `["color", "size"]`). */ + attributes?: string[] | null; + /** A short one-line description of the product, meant to be displayable to the customer. Only applicable to products of `type=good`. */ + caption?: string | null; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** An array of connect application identifiers that cannot purchase this product. Only applicable to products of `type=good`. */ + deactivate_on?: string[]; + /** 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; + /** Unique identifier for the object. */ + id: string; + /** A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ + images: string[]; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** 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; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "product"; + /** The dimensions of this product for shipping purposes. A SKU associated with this product can override this value by having its own `package_dimensions`. Only applicable to products of `type=good`. */ + package_dimensions?: (Partial & { [key: string]: any }) | null; + /** Whether this product is a shipped good. Only applicable to products of `type=good`. */ + shippable?: boolean | null; + /** 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; + /** 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. */ + type: "good" | "service"; + /** 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; + /** Time at which the object was last updated. Measured in seconds since the Unix epoch. */ + updated: number; + /** A URL of a publicly-accessible webpage for this product. Only applicable to products of `type=good`. */ + url?: string | null; + } & { [key: string]: any }; + /** + * 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": { + /** 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; + /** ID of the charge this early fraud warning is for, optionally expanded. */ + charge: (Partial & Partial) & { [key: string]: any }; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "radar.early_fraud_warning"; + } & { [key: string]: any }; + /** + * 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": { + /** The name of the value list for use in rules. */ + alias: string; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** The name or email address of the user who created this value list. */ + created_by: string; + /** Unique identifier for the object. */ + id: string; + /** The type of items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, or `case_sensitive_string`. */ + item_type: + | "card_bin" + | "card_fingerprint" + | "case_sensitive_string" + | "country" + | "email" + | "ip_address" + | "string"; + /** List of items contained within this value list. */ + list_items: { + /** Details about each object. */ + data: components["schemas"]["radar.value_list_item"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** The name of the value list. */ + name: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "radar.value_list"; + } & { [key: string]: any }; + /** + * 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": { + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** The name or email address of the user who added this item to the value list. */ + created_by: string; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "radar.value_list_item"; + /** The value of the item. */ + value: string; + /** The identifier of the value list this item belongs to. */ + value_list: string; + } & { [key: string]: any }; + radar_review_resource_location: { + /** The city where the payment originated. */ + city?: string | null; + /** Two-letter ISO code representing the country where the payment originated. */ + country?: string | null; + /** The geographic latitude where the payment originated. */ + latitude?: number | null; + /** The geographic longitude where the payment originated. */ + longitude?: number | null; + /** The state/county/province/region where the payment originated. */ + region?: string | null; + } & { [key: string]: any }; + radar_review_resource_session: { + /** The browser used in this browser session (e.g., `Chrome`). */ + browser?: string | null; + /** Information about the device used for the browser session (e.g., `Samsung SM-G930T`). */ + device?: string | null; + /** The platform for the browser session (e.g., `Macintosh`). */ + platform?: string | null; + /** The version for the browser session (e.g., `61.0.3163.100`). */ + version?: string | null; + } & { [key: string]: any }; + /** + * 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: { + /** Hash describing the current account on the recipient, if there is one. */ + active_account?: (Partial & { [key: string]: any }) | null; + cards?: + | ({ + data: components["schemas"]["card"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }) + | null; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** The default card to use for creating transfers to this recipient. */ + default_card?: ((Partial & Partial) & { [key: string]: any }) | null; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null; + email?: string | null; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** 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?: ((Partial & Partial) & { [key: string]: any }) | null; + /** Full, legal name of the recipient. */ + name?: string | null; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "recipient"; + rolled_back_from?: (Partial & Partial) & { [key: string]: any }; + /** Type of the recipient, one of `individual` or `corporation`. */ + type: string; + } & { [key: string]: any }; + /** + * `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: { + /** Amount, in %s. */ + amount: number; + /** Balance transaction that describes the impact on your account balance. */ + balance_transaction?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** ID of the charge that was refunded. */ + charge?: ((Partial & Partial) & { [key: string]: any }) | null; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only) */ + description?: string; + /** If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. */ + failure_balance_transaction?: (Partial & Partial) & { + [key: string]: any; + }; + /** 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; + /** Unique identifier for the object. */ + id: 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. */ + metadata: { [key: string]: string }; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "refund"; + /** ID of the PaymentIntent that was refunded. */ + payment_intent?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** Reason for the refund, either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). */ + reason?: string | null; + /** This is the transaction number that appears on email receipts sent for this refund. */ + receipt_number?: string | null; + /** 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?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** 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; + /** If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter. */ + transfer_reversal?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + } & { [key: string]: any }; + /** + * 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": { + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** + * If something should go wrong during the run, a message about the failure (populated when + * `status=failed`). + */ + error?: string | null; + /** Unique identifier for the object. */ + id: string; + /** Always `true`: reports can only be run on live-mode data. */ + livemode: boolean; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "reporting.report_run"; + parameters: components["schemas"]["financial_reporting_finance_report_run_run_parameters"]; + /** 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; + /** + * The file object representing the result of the report run (populated when + * `status=succeeded`). + */ + result?: (Partial & { [key: string]: any }) | null; + /** + * 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; + /** + * Timestamp at which this run successfully finished (populated when + * `status=succeeded`). Measured in seconds since the Unix epoch. + */ + succeeded_at?: number | null; + } & { [key: string]: any }; + /** + * 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": { + /** Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. */ + data_available_end: number; + /** Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch. */ + data_available_start: number; + /** 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; + /** The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`. */ + id: string; + /** Human-readable name of the Report Type */ + name: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "reporting.report_type"; + /** When this Report Type was latest updated. Measured in seconds since the Unix epoch. */ + updated: number; + /** 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; + } & { [key: string]: any }; + reserve_transaction: { + amount: number; + /** 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; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null; + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "reserve_transaction"; + } & { [key: string]: any }; + /** + * 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: { + /** The ZIP or postal code of the card used, if applicable. */ + billing_zip?: string | null; + /** The charge associated with this review. */ + charge?: ((Partial & Partial) & { [key: string]: any }) | null; + /** The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, or `disputed`. */ + closed_reason?: ("approved" | "disputed" | "refunded" | "refunded_as_fraud") | null; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** Unique identifier for the object. */ + id: string; + /** The IP address where the payment originated. */ + ip_address?: string | null; + /** 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?: + | (Partial & { [key: string]: any }) + | null; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "review"; + /** If `true`, the review needs action. */ + open: boolean; + /** The reason the review was opened. One of `rule` or `manual`. */ + opened_reason: "manual" | "rule"; + /** The PaymentIntent ID associated with this review, if one exists. */ + payment_intent?: (Partial & Partial) & { [key: string]: any }; + /** The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, or `disputed`. */ + reason: string; + /** Information related to the browsing session of the user who initiated the payment. */ + session?: (Partial & { [key: string]: any }) | null; + } & { [key: string]: any }; + rule: { + /** The action taken on the payment. */ + action: string; + /** Unique identifier for the object. */ + id: string; + /** The predicate to evaluate the payment against. */ + predicate: string; + } & { [key: string]: any }; + /** + * 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: { + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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"]; + /** The file object representing the results of the query. */ + file?: (Partial & { [key: string]: any }) | null; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "scheduled_query_run"; + /** Time at which the result expires and is no longer available for download. */ + result_available_until: number; + /** SQL for the query. */ + sql: string; + /** The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise. */ + status: string; + /** Title of the query. */ + title: string; + } & { [key: string]: any }; + /** + * 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: { + /** ID of the Connect application that created the SetupIntent. */ + application?: ((Partial & Partial) & { [key: string]: any }) | null; + /** Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. */ + cancellation_reason?: ("abandoned" | "duplicate" | "requested_by_customer") | null; + /** + * 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; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** + * 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?: + | ((Partial & + Partial & + Partial) & { [key: string]: any }) + | null; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null; + /** Unique identifier for the object. */ + id: string; + /** The error encountered in the previous SetupIntent confirmation. */ + last_setup_error?: (Partial & { [key: string]: any }) | null; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** ID of the multi use Mandate generated by the SetupIntent. */ + mandate?: ((Partial & Partial) & { [key: string]: any }) | null; + /** Set of key-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]: string }; + /** If present, this property tells you what actions you need to take in order for your customer to continue payment setup. */ + next_action?: (Partial & { [key: string]: any }) | null; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "setup_intent"; + /** The account (if any) for which the setup is intended. */ + on_behalf_of?: ((Partial & Partial) & { [key: string]: any }) | null; + /** ID of the payment method used with this SetupIntent. */ + payment_method?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** Payment-method-specific configuration for this SetupIntent. */ + payment_method_options?: + | (Partial & { [key: string]: any }) + | null; + /** The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. */ + payment_method_types: string[]; + /** ID of the single_use Mandate generated by the SetupIntent. */ + single_use_mandate?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** [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`. */ + status: + | "canceled" + | "processing" + | "requires_action" + | "requires_confirmation" + | "requires_payment_method" + | "succeeded"; + /** + * 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; + } & { [key: string]: any }; + setup_intent_next_action: { + redirect_to_url?: components["schemas"]["setup_intent_next_action_redirect_to_url"]; + /** Type of the next action to perform, one of `redirect_to_url` or `use_stripe_sdk`. */ + type: string; + /** 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]: any }; + } & { [key: string]: any }; + setup_intent_next_action_redirect_to_url: { + /** If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ + return_url?: string | null; + /** The URL you must redirect your customer to in order to authenticate. */ + url?: string | null; + } & { [key: string]: any }; + setup_intent_payment_method_options: { + card?: components["schemas"]["setup_intent_payment_method_options_card"]; + } & { [key: string]: any }; + setup_intent_payment_method_options_card: { + /** 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. */ + request_three_d_secure?: ("any" | "automatic" | "challenge_only") | null; + } & { [key: string]: any }; + shipping: { + address?: components["schemas"]["address"]; + /** The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. */ + carrier?: string | null; + /** Recipient name. */ + name?: string | null; + /** Recipient phone (including extension). */ + phone?: string | null; + /** 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; + } & { [key: string]: any }; + shipping_method: { + /** 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; + /** 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; + /** The estimated delivery date for the given shipping method. Can be either a specific date or a range. */ + delivery_estimate?: (Partial & { [key: string]: any }) | null; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description: string; + /** Unique identifier for the object. */ + id: string; + } & { [key: string]: any }; + sigma_scheduled_query_run_error: { + /** Information about the run failure. */ + message: string; + } & { [key: string]: any }; + /** + * 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: { + /** Whether the SKU is available for purchase. */ + active: boolean; + /** 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 }; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** Unique identifier for the object. */ + id: string; + /** The URL of an image for this SKU, meant to be displayable to the customer. */ + image?: string | null; + inventory: components["schemas"]["inventory"]; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "sku"; + /** The dimensions of this SKU for shipping purposes. */ + package_dimensions?: (Partial & { [key: string]: any }) | null; + /** 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; + /** The ID of the product this SKU is associated with. The product must be currently active. */ + product: (Partial & Partial) & { [key: string]: any }; + /** Time at which the object was last updated. Measured in seconds since the Unix epoch. */ + updated: number; + } & { [key: string]: any }; + /** + * `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"]; + alipay?: components["schemas"]["source_type_alipay"]; + /** 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"]; + /** 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"]; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** 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"]; + /** The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. */ + flow: string; + giropay?: components["schemas"]["source_type_giropay"]; + /** Unique identifier for the object. */ + id: string; + ideal?: components["schemas"]["source_type_ideal"]; + klarna?: components["schemas"]["source_type_klarna"]; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string } | null; + multibanco?: components["schemas"]["source_type_multibanco"]; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "source"; + /** Information about the owner of the payment instrument that may be used or required by particular source types. */ + owner?: (Partial & { [key: string]: any }) | 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"]; + /** Extra information about a source. This will appear on your customer's statement every time you charge the source. */ + statement_descriptor?: string | null; + /** 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"]; + /** 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. */ + 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"; + /** 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"]; + } & { [key: string]: any }; + source_code_verification_flow: { + /** The number of attempts remaining to authenticate the source object with a verification code. */ + attempts_remaining: number; + /** 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; + } & { [key: string]: any }; + /** + * 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: { + /** 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"]; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "source_mandate_notification"; + /** 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"]; + /** The status of the mandate notification. Valid statuses are `pending` or `submitted`. */ + status: string; + /** 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; + } & { [key: string]: any }; + source_mandate_notification_bacs_debit_data: { + /** Last 4 digits of the account number associated with the debit. */ + last4?: string; + } & { [key: string]: any }; + source_mandate_notification_sepa_debit_data: { + /** SEPA creditor ID. */ + creditor_identifier?: string; + /** Last 4 digits of the account number associated with the debit. */ + last4?: string; + /** Mandate reference associated with the debit. */ + mandate_reference?: string; + } & { [key: string]: any }; + source_order: { + /** 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; + /** 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; + /** The email address of the customer placing the order. */ + email?: string; + /** List of items constituting the order. */ + items?: components["schemas"]["source_order_item"][] | null; + shipping?: components["schemas"]["shipping"]; + } & { [key: string]: any }; + source_order_item: { + /** The amount (price) for this order item. */ + amount?: number | null; + /** This currency of this order item. Required when `amount` is present. */ + currency?: string | null; + /** Human-readable description for this order item. */ + description?: string | null; + /** The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. */ + quantity?: number; + /** The type of this order item. Must be `sku`, `tax`, or `shipping`. */ + type?: string | null; + } & { [key: string]: any }; + source_owner: { + /** Owner's address. */ + address?: (Partial & { [key: string]: any }) | null; + /** Owner's email address. */ + email?: string | null; + /** Owner's full name. */ + name?: string | null; + /** Owner's phone number (including extension). */ + phone?: string | null; + /** 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?: (Partial & { [key: string]: any }) | null; + /** 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; + /** 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; + /** 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; + } & { [key: string]: any }; + source_receiver_flow: { + /** 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; + /** 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; + /** 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; + /** The total amount that was returned to the customer. The amount returned is expressed in the source's currency. */ + amount_returned: number; + /** Type of refund attribute method, one of `email`, `manual`, or `none`. */ + refund_attributes_method: string; + /** Type of refund attribute status, one of `missing`, `requested`, or `available`. */ + refund_attributes_status: string; + } & { [key: string]: any }; + source_redirect_flow: { + /** 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; + /** The URL you provide to redirect the customer to after they authenticated their payment. */ + return_url: string; + /** 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; + /** The URL provided to you to redirect a customer to as part of a `redirect` authentication flow. */ + url: string; + } & { [key: string]: any }; + /** + * 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"]; + /** 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"]; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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"]; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "source_transaction"; + paper_check?: components["schemas"]["source_transaction_paper_check_data"]; + sepa_credit_transfer?: components["schemas"]["source_transaction_sepa_credit_transfer_data"]; + /** The ID of the source this transaction is attached to. */ + source: string; + /** The status of the transaction, one of `succeeded`, `pending`, or `failed`. */ + status: string; + /** The type of source this transaction is attached to. */ + type: + | "ach_credit_transfer" + | "ach_debit" + | "alipay" + | "bancontact" + | "card" + | "card_present" + | "eps" + | "giropay" + | "ideal" + | "klarna" + | "multibanco" + | "p24" + | "sepa_debit" + | "sofort" + | "three_d_secure" + | "wechat"; + } & { [key: string]: any }; + source_transaction_ach_credit_transfer_data: { + /** Customer data associated with the transfer. */ + customer_data?: string; + /** Bank account fingerprint associated with the transfer. */ + fingerprint?: string; + /** Last 4 digits of the account number associated with the transfer. */ + last4?: string; + /** Routing number associated with the transfer. */ + routing_number?: string; + } & { [key: string]: any }; + source_transaction_chf_credit_transfer_data: { + /** Reference associated with the transfer. */ + reference?: string; + /** Sender's country address. */ + sender_address_country?: string; + /** Sender's line 1 address. */ + sender_address_line1?: string; + /** Sender's bank account IBAN. */ + sender_iban?: string; + /** Sender's name. */ + sender_name?: string; + } & { [key: string]: any }; + source_transaction_gbp_credit_transfer_data: { + /** Bank account fingerprint associated with the Stripe owned bank account receiving the transfer. */ + fingerprint?: string; + /** 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; + /** Last 4 digits of sender account number associated with the transfer. */ + last4?: string; + /** Sender entered arbitrary information about the transfer. */ + reference?: string; + /** Sender account number associated with the transfer. */ + sender_account_number?: string; + /** Sender name associated with the transfer. */ + sender_name?: string; + /** Sender sort code associated with the transfer. */ + sender_sort_code?: string; + } & { [key: string]: any }; + source_transaction_paper_check_data: { + /** Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch. */ + available_at?: string; + /** Comma-separated list of invoice IDs associated with the paper check. */ + invoices?: string; + } & { [key: string]: any }; + source_transaction_sepa_credit_transfer_data: { + /** Reference associated with the transfer. */ + reference?: string; + /** Sender's bank account IBAN. */ + sender_iban?: string; + /** Sender's name. */ + sender_name?: string; + } & { [key: string]: any }; + 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; + } & { [key: string]: any }; + source_type_ach_debit: { + bank_name?: string | null; + country?: string | null; + fingerprint?: string | null; + last4?: string | null; + routing_number?: string | null; + type?: string | null; + } & { [key: string]: any }; + source_type_alipay: { + data_string?: string | null; + native_url?: string | null; + statement_descriptor?: string | null; + } & { [key: string]: any }; + source_type_au_becs_debit: { + bsb_number?: string | null; + fingerprint?: string | null; + last4?: string | null; + } & { [key: string]: any }; + 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; + } & { [key: string]: any }; + 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; + } & { [key: string]: any }; + 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; + } & { [key: string]: any }; + source_type_eps: { + reference?: string | null; + statement_descriptor?: string | null; + } & { [key: string]: any }; + source_type_giropay: { + bank_code?: string | null; + bank_name?: string | null; + bic?: string | null; + statement_descriptor?: string | null; + } & { [key: string]: any }; + source_type_ideal: { + bank?: string | null; + bic?: string | null; + iban_last4?: string | null; + statement_descriptor?: string | null; + } & { [key: string]: any }; + 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_first_name?: string; + shipping_last_name?: string; + } & { [key: string]: any }; + 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; + } & { [key: string]: any }; + source_type_p24: { + reference?: string | null; + } & { [key: string]: any }; + 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; + } & { [key: string]: any }; + 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; + } & { [key: string]: any }; + 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; + } & { [key: string]: any }; + source_type_wechat: { + prepay_id?: string; + qr_code_url?: string | null; + statement_descriptor?: string; + } & { [key: string]: any }; + status_transitions: { + /** The time that the order was canceled. */ + canceled?: number | null; + /** The time that the order was fulfilled. */ + fulfiled?: number | null; + /** The time that the order was paid. */ + paid?: number | null; + /** The time that the order was returned. */ + returned?: number | null; + } & { [key: string]: any }; + /** + * Subscriptions allow you to charge a customer on a recurring basis. + * + * Related guide: [Creating Subscriptions](https://stripe.com/docs/billing/subscriptions/creating). + */ + subscription: { + /** 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; + /** 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; + /** Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ + billing_thresholds?: + | (Partial & { [key: string]: any }) + | null; + /** A date in the future at which the subscription will automatically get canceled */ + cancel_at?: number | null; + /** 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; + /** 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 | null; + /** 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. */ + collection_method?: ("charge_automatically" | "send_invoice") | null; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** Start of the current period that the subscription has been invoiced for. */ + current_period_start: number; + /** ID of the customer who owns the subscription. */ + customer: (Partial & + Partial & + Partial) & { [key: string]: any }; + /** 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; + /** 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?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** 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?: + | ((Partial & + Partial & + Partial & + Partial & + Partial & + Partial) & { [key: string]: any }) + | null; + /** 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; + /** 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?: (Partial & { [key: string]: any }) | null; + /** If the subscription has ended, the date the subscription ended. */ + ended_at?: number | null; + /** Unique identifier for the object. */ + id: string; + /** List of subscription items, each with an attached plan. */ + items: { + /** Details about each object. */ + data: components["schemas"]["subscription_item"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + /** The most recent invoice this subscription has generated. */ + latest_invoice?: ((Partial & Partial) & { [key: string]: any }) | null; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** 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; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "subscription"; + /** If specified, payment collection for this subscription will be paused. */ + pause_collection?: + | (Partial & { [key: string]: any }) + | null; + /** 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?: + | (Partial & { [key: string]: any }) + | null; + /** 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?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** 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?: + | (Partial & { [key: string]: any }) + | null; + /** Hash describing the plan the customer is subscribed to. Only set if the subscription contains a single plan. */ + plan?: (Partial & { [key: string]: any }) | null; + /** 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 | null; + /** The schedule attached to the subscription */ + schedule?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** Date when the subscription was first created. The date might differ from the `created` date due to backdating. */ + start_date: number; + /** + * 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. + */ + status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "trialing" | "unpaid"; + /** If provided, each invoice created by this subscription will apply the tax rate, increasing the amount billed to the customer. */ + tax_percent?: number | null; + /** If the subscription has a trial, the end of that trial. */ + trial_end?: number | null; + /** If the subscription has a trial, the beginning of that trial. */ + trial_start?: number | null; + } & { [key: string]: any }; + subscription_billing_thresholds: { + /** Monetary threshold that triggers the subscription to create an invoice */ + amount_gte?: number | null; + /** 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; + } & { [key: string]: any }; + /** + * Subscription items allow you to create customer subscriptions with more than + * one plan, making it easy to represent complex billing relationships. + */ + subscription_item: { + /** Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period */ + billing_thresholds?: + | (Partial & { [key: string]: any }) + | null; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** Unique identifier for the object. */ + id: 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. */ + metadata: { [key: string]: string }; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "subscription_item"; + plan: components["schemas"]["plan"]; + /** The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed. */ + quantity?: number; + /** The `subscription` this `subscription_item` belongs to. */ + subscription: string; + /** 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; + } & { [key: string]: any }; + subscription_item_billing_thresholds: { + /** Usage threshold that triggers the subscription to create an invoice */ + usage_gte?: number | null; + } & { [key: string]: any }; + subscription_pending_invoice_item_interval: { + /** Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. */ + interval: "day" | "month" | "week" | "year"; + /** 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; + } & { [key: string]: any }; + /** + * 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: { + /** Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. */ + canceled_at?: number | null; + /** Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. */ + completed_at?: number | null; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. */ + current_phase?: + | (Partial & { [key: string]: any }) + | null; + /** ID of the customer who owns the subscription schedule. */ + customer: (Partial & + Partial & + Partial) & { [key: string]: any }; + default_settings: components["schemas"]["subscription_schedules_resource_default_settings"]; + /** Behavior of the subscription schedule and underlying subscription when it ends. */ + end_behavior: "cancel" | "none" | "release" | "renew"; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string } | null; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "subscription_schedule"; + /** Configuration for the subscription schedule's phases. */ + phases: components["schemas"]["subscription_schedule_phase_configuration"][]; + /** Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. */ + released_at?: number | null; + /** ID of the subscription once managed by the subscription schedule (if it is released). */ + released_subscription?: string | null; + /** 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). */ + status: "active" | "canceled" | "completed" | "not_started" | "released"; + /** ID of the subscription managed by the subscription schedule. */ + subscription?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + } & { [key: string]: any }; + /** A phase item describes the plan and quantity of a phase. */ + subscription_schedule_configuration_item: { + /** Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period */ + billing_thresholds?: + | (Partial & { [key: string]: any }) + | null; + /** ID of the plan to which the customer should be subscribed. */ + plan: (Partial & + Partial & + Partial) & { [key: string]: any }; + /** Quantity of the plan to which the customer should be subscribed. */ + quantity?: number; + /** 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; + } & { [key: string]: any }; + subscription_schedule_current_phase: { + /** The end of this phase of the subscription schedule. */ + end_date: number; + /** The start of this phase of the subscription schedule. */ + start_date: number; + } & { [key: string]: any }; + /** A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period. */ + subscription_schedule_phase_configuration: { + /** 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; + /** Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ + billing_thresholds?: + | (Partial & { [key: string]: any }) + | null; + /** 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. */ + collection_method?: ("charge_automatically" | "send_invoice") | null; + /** ID of the coupon to use during this phase of the subscription schedule. */ + coupon?: + | ((Partial & + Partial & + Partial) & { [key: string]: any }) + | null; + /** 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?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** The default tax rates to apply to the subscription during this phase of the subscription schedule. */ + default_tax_rates?: components["schemas"]["tax_rate"][] | null; + /** The end of this phase of the subscription schedule. */ + end_date: number; + /** The subscription schedule's default invoice settings. */ + invoice_settings?: + | (Partial & { [key: string]: any }) + | null; + /** Plans to subscribe during this phase of the subscription schedule. */ + plans: components["schemas"]["subscription_schedule_configuration_item"][]; + /** Controls whether or not the subscription schedule will prorate when transitioning to this phase. Values are `create_prorations` and `none`. */ + proration_behavior?: ("always_invoice" | "create_prorations" | "none") | null; + /** The start of this phase of the subscription schedule. */ + start_date: number; + /** 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 | null; + /** When the trial ends within the phase. */ + trial_end?: number | null; + } & { [key: string]: any }; + subscription_schedules_resource_default_settings: { + /** Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ + billing_thresholds?: + | (Partial & { [key: string]: any }) + | null; + /** 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. */ + collection_method?: ("charge_automatically" | "send_invoice") | null; + /** 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?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** The subscription schedule's default invoice settings. */ + invoice_settings?: + | (Partial & { [key: string]: any }) + | null; + } & { [key: string]: any }; + /** + * 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: { + /** The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. */ + behavior: "keep_as_draft" | "mark_uncollectible" | "void"; + /** The time after which the subscription will resume collecting payments. */ + resumes_at?: number | null; + } & { [key: string]: any }; + /** + * Pending Updates store the changes pending from a previous update that will be applied + * to the Subscription upon successful payment. + */ + subscriptions_resource_pending_update: { + /** 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; + /** The point after which the changes reflected by this update will be discarded and no longer applied. */ + expires_at: number; + /** 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; + /** 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; + /** 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 | null; + } & { [key: string]: any }; + tax_deducted_at_source: { + /** Unique identifier for the object. */ + id: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "tax_deducted_at_source"; + /** The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. */ + period_end: number; + /** The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. */ + period_start: number; + /** The TAN that was supplied to Stripe when TDS was assessed */ + tax_deduction_account_number: string; + } & { [key: string]: any }; + /** + * 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: { + /** Two-letter ISO code representing the country of the tax ID. */ + country?: string | null; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** ID of the customer. */ + customer: (Partial & Partial) & { [key: string]: any }; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "tax_id"; + /** 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` */ + 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"; + /** Value of the tax ID. */ + value: string; + verification: components["schemas"]["tax_id_verification"]; + } & { [key: string]: any }; + tax_id_verification: { + /** Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`. */ + status: "pending" | "unavailable" | "unverified" | "verified"; + /** Verified address. */ + verified_address?: string | null; + /** Verified name. */ + verified_name?: string | null; + } & { [key: string]: any }; + /** + * 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: { + /** 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; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + description?: string | null; + /** 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; + /** Unique identifier for the object. */ + id: string; + /** This specifies if the tax rate is inclusive or exclusive. */ + inclusive: boolean; + /** The jurisdiction for the tax rate. */ + jurisdiction?: string | null; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "tax_rate"; + /** This represents the tax rate percent out of 100. */ + percentage: number; + } & { [key: string]: any }; + /** + * 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": { + /** The id of the location that this connection token is scoped to. */ + location?: string; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "terminal.connection_token"; + /** Your application should pass this token to the Stripe Terminal SDK. */ + secret: string; + } & { [key: string]: any }; + /** + * A Location represents a grouping of readers. + * + * Related guide: [Fleet Management](https://stripe.com/docs/terminal/readers/fleet-management#create). + */ + "terminal.location": { + address: components["schemas"]["address"]; + /** The display name of the location. */ + display_name: string; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "terminal.location"; + } & { [key: string]: any }; + /** + * 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": { + /** The current software version of the reader. */ + device_sw_version?: string | null; + /** Type of reader, one of `bbpos_chipper2x` or `verifone_P400`. */ + device_type: "bbpos_chipper2x" | "verifone_P400"; + /** Unique identifier for the object. */ + id: string; + /** The local IP address of the reader. */ + ip_address?: string | null; + /** Custom label given to the reader for easier identification. */ + label: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** The location identifier of the reader. */ + location?: string | null; + /** Set of key-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]: string }; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "terminal.reader"; + /** Serial number of the reader. */ + serial_number: string; + /** The networking status of the reader. */ + status?: string | null; + } & { [key: string]: any }; + /** + * 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: { + /** Amount of the charge that you will create when authentication completes. */ + amount: number; + /** True if the cardholder went through the authentication flow and their bank indicated that authentication succeeded. */ + authenticated: boolean; + card: components["schemas"]["card"]; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "three_d_secure"; + /** 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; + /** 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; + } & { [key: string]: any }; + three_d_secure_details: { + /** Whether or not authentication was performed. 3D Secure will succeed without authentication when the card is not enrolled. */ + authenticated?: boolean; + /** Whether or not 3D Secure succeeded. */ + succeeded?: boolean; + /** The version of 3D Secure that was used for this payment. */ + version: string; + } & { [key: string]: any }; + three_d_secure_usage: { + /** Whether 3D Secure is supported on this card. */ + supported: boolean; + } & { [key: string]: any }; + /** + * 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?: components["schemas"]["bank_account"]; + card?: components["schemas"]["card"]; + /** IP address of the client that generated the token. */ + client_ip?: string | null; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "token"; + /** Type of the token: `account`, `bank_account`, `card`, or `pii`. */ + type: string; + /** Whether this token has already been used (tokens can be used only once). */ + used: boolean; + } & { [key: string]: any }; + /** + * 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: { + /** Amount transferred. */ + amount: number; + /** 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?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null; + /** 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; + /** 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; + /** Message to user further explaining reason for top-up failure if available. */ + failure_message?: string | null; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "topup"; + source: components["schemas"]["source"]; + /** 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; + /** The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`. */ + status: "canceled" | "failed" | "pending" | "reversed" | "succeeded"; + /** A string that identifies this top-up as part of a group. */ + transfer_group?: string | null; + } & { [key: string]: any }; + /** + * 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: { + /** Amount in %s to be transferred. */ + amount: number; + /** Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). */ + amount_reversed: number; + /** Balance transaction that describes the impact of this transfer on your account balance. */ + balance_transaction?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** Time that this record of the transfer was first created. */ + created: number; + /** 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; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null; + /** ID of the Stripe account the transfer was sent to. */ + destination?: ((Partial & Partial) & { [key: string]: any }) | null; + /** 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?: (Partial & Partial) & { [key: string]: any }; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "transfer"; + /** A list of reversals that have been applied to the transfer. */ + reversals: { + /** Details about each object. */ + data: components["schemas"]["transfer_reversal"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + /** Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. */ + reversed: boolean; + /** 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?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. */ + source_type?: string | null; + /** 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; + } & { [key: string]: any }; + transfer_data: { + /** 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; + /** + * 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: (Partial & Partial) & { [key: string]: any }; + } & { [key: string]: any }; + /** + * [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: { + /** Amount, in %s. */ + amount: number; + /** Balance transaction that describes the impact on your account balance. */ + balance_transaction?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** 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; + /** Linked payment refund for the transfer reversal. */ + destination_payment_refund?: + | ((Partial & Partial) & { [key: string]: any }) + | null; + /** Unique identifier for the object. */ + id: 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. */ + metadata: { [key: string]: string }; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "transfer_reversal"; + /** ID of the refund responsible for the transfer reversal. */ + source_refund?: ((Partial & Partial) & { [key: string]: any }) | null; + /** ID of the transfer that was reversed. */ + transfer: (Partial & Partial) & { [key: string]: any }; + } & { [key: string]: any }; + transfer_schedule: { + /** The number of days charges for the account will be held before being paid out. */ + delay_days: number; + /** How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`. */ + interval: string; + /** 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; + /** 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; + } & { [key: string]: any }; + transform_usage: { + /** Divide usage by this number. */ + divide_by: number; + /** After division, either round the result `up` or `down`. */ + round: "down" | "up"; + } & { [key: string]: any }; + /** + * 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: { + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "usage_record"; + /** The usage quantity for the specified date. */ + quantity: number; + /** The ID of the subscription item this usage record contains data for. */ + subscription_item: string; + /** The timestamp when this usage occurred. */ + timestamp: number; + } & { [key: string]: any }; + usage_record_summary: { + /** Unique identifier for the object. */ + id: string; + /** The invoice in which this usage period has been billed for. */ + invoice?: string | null; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "usage_record_summary"; + period: components["schemas"]["period"]; + /** The ID of the subscription item this summary is describing. */ + subscription_item: string; + /** The total usage within this usage period. */ + total_usage: number; + } & { [key: string]: any }; + /** + * 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: { + /** The API version events are rendered as for this webhook endpoint. */ + api_version?: string | null; + /** The ID of the associated Connect application. */ + application?: string | null; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + created: number; + /** An optional description of what the wehbook is used for. */ + description?: string | null; + /** The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection. */ + enabled_events: string[]; + /** Unique identifier for the object. */ + id: string; + /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** Set of key-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]: string }; + /** String representing the object's type. Objects of the same type share the same value. */ + object: "webhook_endpoint"; + /** The endpoint's secret, used to generate [webhook signatures](https://stripe.com/docs/webhooks/signatures). Only returned at creation. */ + secret?: string; + /** The status of the webhook. It can be `enabled` or `disabled`. */ + status: string; + /** The URL of the webhook endpoint. */ + url: string; + } & { [key: string]: any }; + }; +} + +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": { + /** Amount of the charge that you will create when authentication completes. */ + amount: number; + /** The ID of a card token, or the ID of a card belonging to the given customer. */ + card?: string; + /** 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; + /** The customer associated with this 3D secure authentication. */ + customer?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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]: any }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /** + *

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: { + 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": { + /** An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ + account_token?: string; + /** 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?: (Partial< + { + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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; + } & { [key: string]: any }; + /** The business type. */ + business_type?: "company" | "government_entity" | "individual" | "non_profit"; + /** Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`. */ + company?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + } & { [key: string]: any }; + address_kanji?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + } & { [key: string]: any }; + directors_provided?: boolean; + executives_provided?: boolean; + name?: string; + name_kana?: string; + name_kanji?: string; + owners_provided?: boolean; + phone?: 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?: { + document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** 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; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. */ + individual?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + } & { [key: string]: any }; + address_kanji?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + } & { [key: string]: any }; + dob?: (Partial< + { + day: number; + month: number; + year: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + phone?: string; + ssn_last_4?: string; + verification?: { + additional_document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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" + | "legacy_payments" + | "tax_reporting_us_1099_k" + | "tax_reporting_us_1099_misc" + | "transfers" + )[]; + /** Options for customizing how the account functions within Stripe. */ + settings?: { + branding?: { + icon?: string; + logo?: string; + primary_color?: string; + secondary_color?: string; + } & { [key: string]: any }; + card_payments?: { + decline_on?: { + avs_failure?: boolean; + cvc_failure?: boolean; + } & { [key: string]: any }; + statement_descriptor_prefix?: string; + } & { [key: string]: any }; + payments?: { + statement_descriptor?: string; + statement_descriptor_kana?: string; + statement_descriptor_kanji?: string; + } & { [key: string]: any }; + payouts?: { + debit_negative_balances?: boolean; + schedule?: { + delay_days?: (Partial<"minimum"> & Partial) & { [key: string]: any }; + interval?: "daily" | "manual" | "monthly" | "weekly"; + monthly_anchor?: number; + weekly_anchor?: "friday" | "monday" | "saturday" | "sunday" | "thursday" | "tuesday" | "wednesday"; + } & { [key: string]: any }; + statement_descriptor?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** 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; + } & { [key: string]: any }; + }; + }; + }; + }; + /** + *

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: { + 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; + }; + }; + }; + }; + /**

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": { + /** 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?: (Partial< + { + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + external_account?: 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?: { [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]: any }; + }; + }; + }; + /** + *

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; + }; + }; + 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": { + /** The name of the person or business that owns the bank account. */ + account_holder_name?: string; + /** The type of entity that holds the account. This can be either `individual` or `company`. */ + account_holder_type?: "" | "company" | "individual"; + /** City/District/Suburb/Town/Village. */ + address_city?: string; + /** Billing address country, if provided when creating card. */ + address_country?: string; + /** Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string; + /** Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string; + /** State/County/Province/Region. */ + address_state?: string; + /** ZIP or postal code. */ + address_zip?: string; + /** When set to true, this becomes the default external account for its currency. */ + default_for_currency?: boolean; + /** Two digit number representing the card’s expiration month. */ + exp_month?: string; + /** Four digit number representing the card’s expiration year. */ + exp_year?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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]: any }; + }; + }; + }; + /**

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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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": { + /** The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ + data: ((Partial & Partial) & { + [key: string]: any; + })[]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** 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?: (Partial< + { + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + external_account?: 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?: { [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]: any }; + }; + }; + }; + /** + *

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; + }; + }; + 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": { + /** The name of the person or business that owns the bank account. */ + account_holder_name?: string; + /** The type of entity that holds the account. This can be either `individual` or `company`. */ + account_holder_type?: "" | "company" | "individual"; + /** City/District/Suburb/Town/Village. */ + address_city?: string; + /** Billing address country, if provided when creating card. */ + address_country?: string; + /** Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string; + /** Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string; + /** State/County/Province/Region. */ + address_state?: string; + /** ZIP or postal code. */ + address_zip?: string; + /** When set to true, this becomes the default external account for its currency. */ + default_for_currency?: boolean; + /** Two digit number representing the card’s expiration month. */ + exp_month?: string; + /** Four digit number representing the card’s expiration year. */ + exp_year?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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]: any }; + }; + }; + }; + /** + *

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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Where to redirect the user after they log out of their dashboard. */ + redirect_url?: string; + }; + }; + }; + }; + /** + *

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: { + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["light_account_logout"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + account: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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; + } & { [key: string]: any }; + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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; + /** The person's address. */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + /** 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; + } & { [key: string]: any }; + /** 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; + } & { [key: string]: any }; + /** The person's date of birth. */ + dob?: (Partial< + { + day: number; + month: number; + year: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** The person's email address. */ + email?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The person's first name. */ + first_name?: string; + /** The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string; + /** The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string; + /** The person's gender (International regulations require either "male" or "female"). */ + gender?: string; + /** 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; + /** The person's last name. */ + last_name?: string; + /** The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string; + /** The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string; + /** The person's maiden name. */ + maiden_name?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string; + /** The person's phone number. */ + phone?: string; + /** The relationship that this person has with the account's legal entity. */ + relationship?: { + director?: boolean; + executive?: boolean; + owner?: boolean; + percent_ownership?: (Partial & Partial<"">) & { [key: string]: any }; + representative?: boolean; + title?: string; + } & { [key: string]: any }; + /** The last 4 digits of the person's social security number. */ + ssn_last_4?: string; + /** The person's verification status. */ + verification?: { + additional_document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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; + /** The person's address. */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + /** 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; + } & { [key: string]: any }; + /** 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; + } & { [key: string]: any }; + /** The person's date of birth. */ + dob?: (Partial< + { + day: number; + month: number; + year: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** The person's email address. */ + email?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The person's first name. */ + first_name?: string; + /** The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string; + /** The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string; + /** The person's gender (International regulations require either "male" or "female"). */ + gender?: string; + /** 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; + /** The person's last name. */ + last_name?: string; + /** The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string; + /** The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string; + /** The person's maiden name. */ + maiden_name?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string; + /** The person's phone number. */ + phone?: string; + /** The relationship that this person has with the account's legal entity. */ + relationship?: { + director?: boolean; + executive?: boolean; + owner?: boolean; + percent_ownership?: (Partial & Partial<"">) & { [key: string]: any }; + representative?: boolean; + title?: string; + } & { [key: string]: any }; + /** The last 4 digits of the person's social security number. */ + ssn_last_4?: string; + /** The person's verification status. */ + verification?: { + additional_document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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; + } & { [key: string]: any }; + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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; + /** The person's address. */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + /** 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; + } & { [key: string]: any }; + /** 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; + } & { [key: string]: any }; + /** The person's date of birth. */ + dob?: (Partial< + { + day: number; + month: number; + year: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** The person's email address. */ + email?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The person's first name. */ + first_name?: string; + /** The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string; + /** The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string; + /** The person's gender (International regulations require either "male" or "female"). */ + gender?: string; + /** 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; + /** The person's last name. */ + last_name?: string; + /** The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string; + /** The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string; + /** The person's maiden name. */ + maiden_name?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string; + /** The person's phone number. */ + phone?: string; + /** The relationship that this person has with the account's legal entity. */ + relationship?: { + director?: boolean; + executive?: boolean; + owner?: boolean; + percent_ownership?: (Partial & Partial<"">) & { [key: string]: any }; + representative?: boolean; + title?: string; + } & { [key: string]: any }; + /** The last 4 digits of the person's social security number. */ + ssn_last_4?: string; + /** The person's verification status. */ + verification?: { + additional_document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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; + /** The person's address. */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + /** 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; + } & { [key: string]: any }; + /** 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; + } & { [key: string]: any }; + /** The person's date of birth. */ + dob?: (Partial< + { + day: number; + month: number; + year: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** The person's email address. */ + email?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The person's first name. */ + first_name?: string; + /** The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string; + /** The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string; + /** The person's gender (International regulations require either "male" or "female"). */ + gender?: string; + /** 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; + /** The person's last name. */ + last_name?: string; + /** The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string; + /** The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string; + /** The person's maiden name. */ + maiden_name?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string; + /** The person's phone number. */ + phone?: string; + /** The relationship that this person has with the account's legal entity. */ + relationship?: { + director?: boolean; + executive?: boolean; + owner?: boolean; + percent_ownership?: (Partial & Partial<"">) & { [key: string]: any }; + representative?: boolean; + title?: string; + } & { [key: string]: any }; + /** The last 4 digits of the person's social security number. */ + ssn_last_4?: string; + /** The person's verification status. */ + verification?: { + additional_document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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: { + 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": { + /** The identifier of the account to create an account link for. */ + account: string; + /** Which information the platform needs to collect from the user. One of `currently_due` or `eventually_due`. Default is `currently_due`. */ + collect?: "currently_due" | "eventually_due"; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The URL that the user will be redirected to if the account link is no longer valid. */ + failure_url: string; + /** The URL that the user will be redirected to upon leaving or completing the linked flow successfully. */ + success_url: string; + /** The type of account link the user is requesting. Possible values are `custom_account_verification` or `custom_account_update`. */ + type: "custom_account_update" | "custom_account_verification"; + }; + }; + }; + }; + /**

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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /** + *

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: { + 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": { + /** An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ + account_token?: string; + /** 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?: (Partial< + { + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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; + } & { [key: string]: any }; + /** The business type. */ + business_type?: "company" | "government_entity" | "individual" | "non_profit"; + /** Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`. */ + company?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + } & { [key: string]: any }; + address_kanji?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + } & { [key: string]: any }; + directors_provided?: boolean; + executives_provided?: boolean; + name?: string; + name_kana?: string; + name_kanji?: string; + owners_provided?: boolean; + phone?: 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?: { + document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** 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; + /** 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; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. */ + individual?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + } & { [key: string]: any }; + address_kanji?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + } & { [key: string]: any }; + dob?: (Partial< + { + day: number; + month: number; + year: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + phone?: string; + ssn_last_4?: string; + verification?: { + additional_document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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" + | "legacy_payments" + | "tax_reporting_us_1099_k" + | "tax_reporting_us_1099_misc" + | "transfers" + )[]; + /** Options for customizing how the account functions within Stripe. */ + settings?: { + branding?: { + icon?: string; + logo?: string; + primary_color?: string; + secondary_color?: string; + } & { [key: string]: any }; + card_payments?: { + decline_on?: { + avs_failure?: boolean; + cvc_failure?: boolean; + } & { [key: string]: any }; + statement_descriptor_prefix?: string; + } & { [key: string]: any }; + payments?: { + statement_descriptor?: string; + statement_descriptor_kana?: string; + statement_descriptor_kanji?: string; + } & { [key: string]: any }; + payouts?: { + debit_negative_balances?: boolean; + schedule?: { + delay_days?: (Partial<"minimum"> & Partial) & { [key: string]: any }; + interval?: "daily" | "manual" | "monthly" | "weekly"; + monthly_anchor?: number; + weekly_anchor?: "friday" | "monday" | "saturday" | "sunday" | "thursday" | "tuesday" | "wednesday"; + } & { [key: string]: any }; + statement_descriptor?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** 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; + } & { [key: string]: any }; + /** 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. */ + 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]: any }; + }; + }; + }; + /** + *

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; + }; + }; + 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": { + /** An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ + account_token?: string; + /** 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?: (Partial< + { + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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; + } & { [key: string]: any }; + /** The business type. */ + business_type?: "company" | "government_entity" | "individual" | "non_profit"; + /** Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`. */ + company?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + } & { [key: string]: any }; + address_kanji?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + } & { [key: string]: any }; + directors_provided?: boolean; + executives_provided?: boolean; + name?: string; + name_kana?: string; + name_kanji?: string; + owners_provided?: boolean; + phone?: 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?: { + document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** 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; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. */ + individual?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + } & { [key: string]: any }; + address_kanji?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + } & { [key: string]: any }; + dob?: (Partial< + { + day: number; + month: number; + year: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + phone?: string; + ssn_last_4?: string; + verification?: { + additional_document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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" + | "legacy_payments" + | "tax_reporting_us_1099_k" + | "tax_reporting_us_1099_misc" + | "transfers" + )[]; + /** Options for customizing how the account functions within Stripe. */ + settings?: { + branding?: { + icon?: string; + logo?: string; + primary_color?: string; + secondary_color?: string; + } & { [key: string]: any }; + card_payments?: { + decline_on?: { + avs_failure?: boolean; + cvc_failure?: boolean; + } & { [key: string]: any }; + statement_descriptor_prefix?: string; + } & { [key: string]: any }; + payments?: { + statement_descriptor?: string; + statement_descriptor_kana?: string; + statement_descriptor_kanji?: string; + } & { [key: string]: any }; + payouts?: { + debit_negative_balances?: boolean; + schedule?: { + delay_days?: (Partial<"minimum"> & Partial) & { [key: string]: any }; + interval?: "daily" | "manual" | "monthly" | "weekly"; + monthly_anchor?: number; + weekly_anchor?: "friday" | "monday" | "saturday" | "sunday" | "thursday" | "tuesday" | "wednesday"; + } & { [key: string]: any }; + statement_descriptor?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** 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; + } & { [key: string]: any }; + }; + }; + }; + }; + /** + *

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: { + 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]: any }; + }; + }; + }; + /**

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": { + /** 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?: (Partial< + { + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + external_account?: 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?: { [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]: any }; + }; + }; + }; + /** + *

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; + }; + }; + 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": { + /** The name of the person or business that owns the bank account. */ + account_holder_name?: string; + /** The type of entity that holds the account. This can be either `individual` or `company`. */ + account_holder_type?: "" | "company" | "individual"; + /** City/District/Suburb/Town/Village. */ + address_city?: string; + /** Billing address country, if provided when creating card. */ + address_country?: string; + /** Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string; + /** Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string; + /** State/County/Province/Region. */ + address_state?: string; + /** ZIP or postal code. */ + address_zip?: string; + /** When set to true, this becomes the default external account for its currency. */ + default_for_currency?: boolean; + /** Two digit number representing the card’s expiration month. */ + exp_month?: string; + /** Four digit number representing the card’s expiration year. */ + exp_year?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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]: any }; + }; + }; + }; + /**

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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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": { + /** The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ + data: ((Partial & Partial) & { + [key: string]: any; + })[]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** 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?: (Partial< + { + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Please refer to full [documentation](https://stripe.com/docs/api) instead. */ + external_account?: 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?: { [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]: any }; + }; + }; + }; + /** + *

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; + }; + }; + 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": { + /** The name of the person or business that owns the bank account. */ + account_holder_name?: string; + /** The type of entity that holds the account. This can be either `individual` or `company`. */ + account_holder_type?: "" | "company" | "individual"; + /** City/District/Suburb/Town/Village. */ + address_city?: string; + /** Billing address country, if provided when creating card. */ + address_country?: string; + /** Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string; + /** Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string; + /** State/County/Province/Region. */ + address_state?: string; + /** ZIP or postal code. */ + address_zip?: string; + /** When set to true, this becomes the default external account for its currency. */ + default_for_currency?: boolean; + /** Two digit number representing the card’s expiration month. */ + exp_month?: string; + /** Four digit number representing the card’s expiration year. */ + exp_year?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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]: any }; + }; + }; + }; + /** + *

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Where to redirect the user after they log out of their dashboard. */ + redirect_url?: string; + }; + }; + }; + }; + /** + *

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; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["light_account_logout"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: 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; + } & { [key: string]: any }; + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** The person's address. */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + /** 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; + } & { [key: string]: any }; + /** 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; + } & { [key: string]: any }; + /** The person's date of birth. */ + dob?: (Partial< + { + day: number; + month: number; + year: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** The person's email address. */ + email?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The person's first name. */ + first_name?: string; + /** The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string; + /** The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string; + /** The person's gender (International regulations require either "male" or "female"). */ + gender?: string; + /** 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; + /** The person's last name. */ + last_name?: string; + /** The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string; + /** The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string; + /** The person's maiden name. */ + maiden_name?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string; + /** The person's phone number. */ + phone?: string; + /** The relationship that this person has with the account's legal entity. */ + relationship?: { + director?: boolean; + executive?: boolean; + owner?: boolean; + percent_ownership?: (Partial & Partial<"">) & { [key: string]: any }; + representative?: boolean; + title?: string; + } & { [key: string]: any }; + /** The last 4 digits of the person's social security number. */ + ssn_last_4?: string; + /** The person's verification status. */ + verification?: { + additional_document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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": { + /** The person's address. */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + /** 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; + } & { [key: string]: any }; + /** 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; + } & { [key: string]: any }; + /** The person's date of birth. */ + dob?: (Partial< + { + day: number; + month: number; + year: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** The person's email address. */ + email?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The person's first name. */ + first_name?: string; + /** The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string; + /** The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string; + /** The person's gender (International regulations require either "male" or "female"). */ + gender?: string; + /** 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; + /** The person's last name. */ + last_name?: string; + /** The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string; + /** The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string; + /** The person's maiden name. */ + maiden_name?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string; + /** The person's phone number. */ + phone?: string; + /** The relationship that this person has with the account's legal entity. */ + relationship?: { + director?: boolean; + executive?: boolean; + owner?: boolean; + percent_ownership?: (Partial & Partial<"">) & { [key: string]: any }; + representative?: boolean; + title?: string; + } & { [key: string]: any }; + /** The last 4 digits of the person's social security number. */ + ssn_last_4?: string; + /** The person's verification status. */ + verification?: { + additional_document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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; + } & { [key: string]: any }; + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** The person's address. */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + /** 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; + } & { [key: string]: any }; + /** 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; + } & { [key: string]: any }; + /** The person's date of birth. */ + dob?: (Partial< + { + day: number; + month: number; + year: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** The person's email address. */ + email?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The person's first name. */ + first_name?: string; + /** The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string; + /** The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string; + /** The person's gender (International regulations require either "male" or "female"). */ + gender?: string; + /** 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; + /** The person's last name. */ + last_name?: string; + /** The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string; + /** The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string; + /** The person's maiden name. */ + maiden_name?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string; + /** The person's phone number. */ + phone?: string; + /** The relationship that this person has with the account's legal entity. */ + relationship?: { + director?: boolean; + executive?: boolean; + owner?: boolean; + percent_ownership?: (Partial & Partial<"">) & { [key: string]: any }; + representative?: boolean; + title?: string; + } & { [key: string]: any }; + /** The last 4 digits of the person's social security number. */ + ssn_last_4?: string; + /** The person's verification status. */ + verification?: { + additional_document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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": { + /** The person's address. */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + /** 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; + } & { [key: string]: any }; + /** 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; + } & { [key: string]: any }; + /** The person's date of birth. */ + dob?: (Partial< + { + day: number; + month: number; + year: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** The person's email address. */ + email?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The person's first name. */ + first_name?: string; + /** The Kana variation of the person's first name (Japan only). */ + first_name_kana?: string; + /** The Kanji variation of the person's first name (Japan only). */ + first_name_kanji?: string; + /** The person's gender (International regulations require either "male" or "female"). */ + gender?: string; + /** 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; + /** The person's last name. */ + last_name?: string; + /** The Kana variation of the person's last name (Japan only). */ + last_name_kana?: string; + /** The Kanji variation of the person's last name (Japan only). */ + last_name_kanji?: string; + /** The person's maiden name. */ + maiden_name?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ + person_token?: string; + /** The person's phone number. */ + phone?: string; + /** The relationship that this person has with the account's legal entity. */ + relationship?: { + director?: boolean; + executive?: boolean; + owner?: boolean; + percent_ownership?: (Partial & Partial<"">) & { [key: string]: any }; + representative?: boolean; + title?: string; + } & { [key: string]: any }; + /** The last 4 digits of the person's social security number. */ + ssn_last_4?: string; + /** The person's verification status. */ + verification?: { + additional_document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /** + *

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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; + /** 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]: any }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /** + *

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + 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; + /** 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": { + /** Details about each object. */ + data: components["schemas"]["fee_refund"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /** + *

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": { + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [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]: any }; + }; + }; + }; + /** + *

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: { + available_on?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + created?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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: `charge`, `refund`, `adjustment`, `application_fee`, `application_fee_refund`, `transfer`, `payment`, `payout`, `payout_failure`, `stripe_fee`, or `network_cost`. */ + type?: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + data: components["schemas"]["balance_transaction"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /** + *

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]: any }; + }; + }; + }; + /** + *

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: { + available_on?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + created?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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: `charge`, `refund`, `adjustment`, `application_fee`, `application_fee_refund`, `transfer`, `payment`, `payout`, `payout_failure`, `stripe_fee`, or `network_cost`. */ + type?: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + data: components["schemas"]["balance_transaction"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /** + *

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]: any }; + }; + }; + }; + /**

Creates a session of the Self-service 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": { + /** The ID of an existing customer. */ + customer: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + }; + }; + }; + }; + /**

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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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": { + /** Details about each object. */ + data: components["schemas"]["bitcoin_transaction"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** Details about each object. */ + data: components["schemas"]["bitcoin_transaction"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** 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; + /** 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; + /** 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; + /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ + card?: (Partial< + { + 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; + object?: "card"; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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; + /** The ID of an existing customer that will be charged in this request. */ + customer?: string; + /** 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?: (Partial< + { + account: string; + amount?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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; + /** 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 information for the charge. Helps prevent fraud on charges for physical goods. */ + shipping?: { + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + carrier?: string; + name: string; + phone?: string; + tracking_number?: string; + } & { [key: string]: any }; + /** 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; + /** 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; + /** 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; + /** 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; + } & { [key: string]: any }; + /** 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]: any }; + }; + }; + }; + /**

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": { + /** 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; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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?: { + user_report: "" | "fraudulent" | "safe"; + } & { [key: string]: any }; + /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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 information for the charge. Helps prevent fraud on charges for physical goods. */ + shipping?: { + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + carrier?: string; + name: string; + phone?: string; + tracking_number?: string; + } & { [key: string]: any }; + /** 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 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; + }; + }; + 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": { + /** The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. */ + amount?: number; + /** An application fee to add on to this charge. */ + application_fee?: number; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** 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; + /** 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; + /** 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; + } & { [key: string]: any }; + /** 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]: any }; + }; + }; + }; + 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": { + /** 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; + } & { [key: string]: any }; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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": { + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + payment_intent?: 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": { + /** Details about each object. */ + data: components["schemas"]["refund"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + payment_intent?: 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]: any }; + }; + }; + }; + /**

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + metadata?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + }; + }; + }; + }; + /**

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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** Specify whether Checkout should collect the customer's billing address. */ + billing_address_collection?: "auto" | "required"; + /** The URL the customer will be directed to if they decide to cancel payment and return to your website. */ + cancel_url: string; + /** + * 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; + /** + * 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; + /** + * 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** + * 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[]; + } & { [key: string]: any })[]; + /** The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. */ + locale?: + | "auto" + | "da" + | "de" + | "en" + | "es" + | "fi" + | "fr" + | "it" + | "ja" + | "ms" + | "nb" + | "nl" + | "pl" + | "pt" + | "pt-BR" + | "sv" + | "zh"; + /** Set of key-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]: string }; + /** The mode of the Checkout Session, one of `payment`, `setup`, or `subscription`. */ + mode?: "payment" | "setup" | "subscription"; + /** A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. */ + payment_intent_data?: { + application_fee_amount?: number; + capture_method?: "automatic" | "manual"; + description?: string; + metadata?: { [key: string]: string }; + on_behalf_of?: string; + receipt_email?: string; + setup_future_usage?: "off_session" | "on_session"; + shipping?: { + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + carrier?: string; + name: string; + phone?: string; + tracking_number?: string; + } & { [key: string]: any }; + statement_descriptor?: string; + statement_descriptor_suffix?: string; + transfer_data?: { + amount?: number; + destination: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** A list of the types of payment methods (e.g., card) this Checkout session can accept. */ + payment_method_types: ("card" | "fpx" | "ideal")[]; + /** 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; + } & { [key: string]: any }; + /** 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" + )[]; + } & { [key: string]: any }; + /** + * 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. + */ + submit_type?: "auto" | "book" | "donate" | "pay"; + /** 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[]; + } & { [key: string]: any })[]; + metadata?: { [key: string]: string }; + trial_end?: number; + trial_from_plan?: boolean; + trial_period_days?: number; + } & { [key: string]: any }; + /** + * 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; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /** + *

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": { + /** A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). */ + amount_off?: number; + /** 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; + /** Specifies how long the discount will be in effect. Can be `forever`, `once`, or `repeating`. */ + duration: "forever" | "once" | "repeating"; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** 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; + /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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; + /** 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; + /** 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]: any }; + }; + }; + }; + /**

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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]: any }; + }; + }; + }; + /**

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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /** + *

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": { + /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + type: "custom_line_item" | "invoice_line_item"; + unit_amount?: number; + unit_amount_decimal?: string; + } & { [key: string]: any })[]; + /** 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?: { [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; + }; + }; + }; + }; + /**

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?: (Partial & Partial<"">) & { [key: string]: any }; + type: "custom_line_item" | "invoice_line_item"; + unit_amount?: number; + unit_amount_decimal?: string; + } & { [key: string]: any })[]; + /** 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?: { [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]: any }; + }; + }; + }; + /**

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?: (Partial & Partial<"">) & { [key: string]: any }; + type: "custom_line_item" | "invoice_line_item"; + unit_amount?: number; + unit_amount_decimal?: string; + } & { [key: string]: any })[]; + /** 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?: { [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": { + /** Details about each object. */ + data: components["schemas"]["credit_note_line_item"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** Details about each object. */ + data: components["schemas"]["credit_note_line_item"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Credit note memo. */ + 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?: { [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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; + }; + }; + }; + /**

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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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; + /** 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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** The customer's address. */ + address?: (Partial< + { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** 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; + /** An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. */ + description?: string; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. */ + invoice_prefix?: string; + /** Default invoice settings for this customer. */ + invoice_settings?: { + custom_fields?: (Partial< + ({ + name: string; + value: string; + } & { [key: string]: any })[] + > & + Partial<"">) & { [key: string]: any }; + default_payment_method?: string; + footer?: string; + } & { [key: string]: any }; + /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** The customer's full name or business name. */ + name?: string; + /** The sequence to be used on the customer's next invoice. Defaults to 1. */ + next_invoice_sequence?: number; + payment_method?: string; + /** The customer's phone number. */ + phone?: string; + /** Customer's preferred languages, ordered by preference. */ + preferred_locales?: string[]; + /** The customer's shipping information. Appears on invoices emailed to this customer. */ + shipping?: (Partial< + { + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + name: string; + phone?: string; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + source?: string; + /** The customer's tax exemption. One of `none`, `exempt`, or `reverse`. */ + tax_exempt?: "" | "exempt" | "none" | "reverse"; + /** The customer's tax IDs. */ + tax_id_data?: ({ + 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; + } & { [key: string]: any })[]; + }; + }; + }; + }; + /**

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

*/ + GetCustomersCustomer: { + parameters: { + path: { + customer: string; + }; + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": (Partial & + Partial) & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /** + *

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": { + /** The customer's address. */ + address?: (Partial< + { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** 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; + /** 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?: (Partial< + { + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ + card?: (Partial< + { + 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; + object?: "card"; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + coupon?: string; + /** ID of Alipay account to make the customer's new default for invoice payments. */ + default_alipay_account?: string; + /** ID of bank account to make the customer's new default for invoice payments. */ + default_bank_account?: string; + /** ID of card to make the customer's new default for invoice payments. */ + default_card?: string; + /** + * 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; + /** An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. */ + description?: string; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. */ + invoice_prefix?: string; + /** Default invoice settings for this customer. */ + invoice_settings?: { + custom_fields?: (Partial< + ({ + name: string; + value: string; + } & { [key: string]: any })[] + > & + Partial<"">) & { [key: string]: any }; + default_payment_method?: string; + footer?: string; + } & { [key: string]: any }; + /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** The customer's full name or business name. */ + name?: string; + /** The sequence to be used on the customer's next invoice. Defaults to 1. */ + next_invoice_sequence?: number; + /** The customer's phone number. */ + phone?: string; + /** Customer's preferred languages, ordered by preference. */ + preferred_locales?: string[]; + /** The customer's shipping information. Appears on invoices emailed to this customer. */ + shipping?: (Partial< + { + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + name: string; + phone?: string; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + source?: string; + /** The customer's tax exemption. One of `none`, `exempt`, or `reverse`. */ + tax_exempt?: "" | "exempt" | "none" | "reverse"; + /** 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?: (Partial<"now"> & Partial) & { [key: string]: any }; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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

*/ + 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": { + /** Details about each object. */ + data: components["schemas"]["customer_balance_transaction"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

Creates an immutable transaction that updates the customer’s 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": { + /** 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; + /** 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; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + }; + }; + }; + }; + /**

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

*/ + 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]: any }; + }; + }; + }; + /**

Most customer 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": { + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + }; + }; + }; + }; + /**

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": { + /** Details about each object. */ + data: components["schemas"]["bank_account"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /** + *

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": { + /** A token returned by [Stripe.js](https://stripe.com/docs/stripe.js) representing the user’s Alipay account details. */ + alipay_account?: string; + /** 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?: (Partial< + { + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ + card?: (Partial< + { + 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; + object?: "card"; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [key: string]: string }; + /** 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]: any }; + }; + }; + }; + /**

Update a specified source for a given customer.

*/ + PostCustomersCustomerBankAccountsId: { + parameters: { + path: { + customer: string; + id: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": (Partial & + Partial & + Partial) & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** The name of the person or business that owns the bank account. */ + account_holder_name?: string; + /** The type of entity that holds the account. This can be either `individual` or `company`. */ + account_holder_type?: "company" | "individual"; + /** City/District/Suburb/Town/Village. */ + address_city?: string; + /** Billing address country, if provided when creating card. */ + address_country?: string; + /** Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string; + /** Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string; + /** State/County/Province/Region. */ + address_state?: string; + /** ZIP or postal code. */ + address_zip?: string; + /** Two digit number representing the card’s expiration month. */ + exp_month?: string; + /** Four digit number representing the card’s expiration year. */ + exp_year?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** Cardholder name. */ + name?: string; + owner?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + email?: string; + name?: string; + phone?: string; + } & { [key: string]: any }; + }; + }; + }; + }; + /**

Delete a specified source for a given customer.

*/ + DeleteCustomersCustomerBankAccountsId: { + parameters: { + path: { + customer: string; + id: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": (Partial & + Partial) & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** 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": { + /** Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ + amounts?: number[]; + /** 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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /** + *

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": { + /** A token returned by [Stripe.js](https://stripe.com/docs/stripe.js) representing the user’s Alipay account details. */ + alipay_account?: string; + /** 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?: (Partial< + { + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ + card?: (Partial< + { + 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; + object?: "card"; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [key: string]: string }; + /** 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]: any }; + }; + }; + }; + /**

Update a specified source for a given customer.

*/ + PostCustomersCustomerCardsId: { + parameters: { + path: { + customer: string; + id: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": (Partial & + Partial & + Partial) & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** The name of the person or business that owns the bank account. */ + account_holder_name?: string; + /** The type of entity that holds the account. This can be either `individual` or `company`. */ + account_holder_type?: "company" | "individual"; + /** City/District/Suburb/Town/Village. */ + address_city?: string; + /** Billing address country, if provided when creating card. */ + address_country?: string; + /** Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string; + /** Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string; + /** State/County/Province/Region. */ + address_state?: string; + /** ZIP or postal code. */ + address_zip?: string; + /** Two digit number representing the card’s expiration month. */ + exp_month?: string; + /** Four digit number representing the card’s expiration year. */ + exp_year?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** Cardholder name. */ + name?: string; + owner?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + email?: string; + name?: string; + phone?: string; + } & { [key: string]: any }; + }; + }; + }; + }; + /**

Delete a specified source for a given customer.

*/ + DeleteCustomersCustomerCardsId: { + parameters: { + path: { + customer: string; + id: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": (Partial & + Partial) & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** 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]: any }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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": { + /** Details about each object. */ + data: ((Partial & + Partial & + Partial & + Partial & + Partial) & { [key: string]: any })[]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /** + *

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": { + /** A token returned by [Stripe.js](https://stripe.com/docs/stripe.js) representing the user’s Alipay account details. */ + alipay_account?: string; + /** 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?: (Partial< + { + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ + card?: (Partial< + { + 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; + object?: "card"; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [key: string]: string }; + /** 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]: any }; + }; + }; + }; + /**

Update a specified source for a given customer.

*/ + PostCustomersCustomerSourcesId: { + parameters: { + path: { + customer: string; + id: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": (Partial & + Partial & + Partial) & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** The name of the person or business that owns the bank account. */ + account_holder_name?: string; + /** The type of entity that holds the account. This can be either `individual` or `company`. */ + account_holder_type?: "company" | "individual"; + /** City/District/Suburb/Town/Village. */ + address_city?: string; + /** Billing address country, if provided when creating card. */ + address_country?: string; + /** Address line 1 (Street address/PO Box/Company name). */ + address_line1?: string; + /** Address line 2 (Apartment/Suite/Unit/Building). */ + address_line2?: string; + /** State/County/Province/Region. */ + address_state?: string; + /** ZIP or postal code. */ + address_zip?: string; + /** Two digit number representing the card’s expiration month. */ + exp_month?: string; + /** Four digit number representing the card’s expiration year. */ + exp_year?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** Cardholder name. */ + name?: string; + owner?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + email?: string; + name?: string; + phone?: string; + } & { [key: string]: any }; + }; + }; + }; + }; + /**

Delete a specified source for a given customer.

*/ + DeleteCustomersCustomerSourcesId: { + parameters: { + path: { + customer: string; + id: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": (Partial & + Partial) & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** 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": { + /** Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ + amounts?: number[]; + /** 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": { + /** Details about each object. */ + data: components["schemas"]["subscription"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** 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; + /** 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; + /** 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; + /** 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?: (Partial< + { + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** 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; + /** Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean; + /** 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`. */ + collection_method?: "charge_automatically" | "send_invoice"; + /** 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; + /** 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; + /** 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; + /** 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; + /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** A list of up to 20 subscription items, each with an attached plan. */ + items?: ({ + billing_thresholds?: (Partial< + { + usage_gte: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + metadata?: { [key: string]: string }; + plan?: string; + quantity?: number; + tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; + } & { [key: string]: any })[]; + /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean; + /** + * 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. + */ + payment_behavior?: "allow_incomplete" | "error_if_incomplete" | "pending_if_incomplete"; + /** 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?: (Partial< + { + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** 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; + /** + * 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`. + */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + /** 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?: (Partial<"now"> & Partial) & { [key: string]: any }; + /** 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; + /** 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; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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": { + /** 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; + /** 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). */ + billing_cycle_anchor?: "now" | "unchanged"; + /** 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?: (Partial< + { + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + /** Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean; + /** 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`. */ + collection_method?: "charge_automatically" | "send_invoice"; + /** 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; + /** 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; + /** 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; + /** 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; + /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** List of subscription items, each with an attached plan. */ + items?: ({ + billing_thresholds?: (Partial< + { + usage_gte: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + clear_usage?: boolean; + deleted?: boolean; + id?: string; + metadata?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + plan?: string; + quantity?: number; + tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; + } & { [key: string]: any })[]; + /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean; + /** If specified, payment collection for this subscription will be paused. */ + pause_collection?: (Partial< + { + behavior: "keep_as_draft" | "mark_uncollectible" | "void"; + resumes_at?: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** + * 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. + */ + payment_behavior?: "allow_incomplete" | "error_if_incomplete" | "pending_if_incomplete"; + /** 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?: (Partial< + { + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** 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; + /** + * 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`. + */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + /** 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; + /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + /** 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?: (Partial<"now"> & Partial) & { [key: string]: any }; + /** 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; + }; + }; + }; + }; + /** + *

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** 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]: any }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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": { + /** Details about each object. */ + data: components["schemas"]["tax_id"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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` */ + 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 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]: any }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

Returns a list of your disputes.

*/ + GetDisputes: { + parameters: { + query: { + /** Only return disputes associated to the charge specified by this charge ID. */ + charge?: string; + created?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /** + *

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": { + /** 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; + } & { [key: string]: any }; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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": { + /** 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": { + /** The ID of the Customer you'd like to modify using the resulting ephemeral key. */ + customer?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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": { + /** 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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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

*/ + GetExchangeRatesCurrency: { + parameters: { + path: { + currency: string; + }; + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: 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]: any }; + }; + }; + }; + /**

Returns a list of file links.

*/ + GetFileLinks: { + parameters: { + query: { + created?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** A future timestamp after which the link will no longer be usable. */ + expires_at?: number; + /** 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; + /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. */ + expires_at?: (Partial<"now"> & Partial & Partial<"">) & { [key: string]: any }; + /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + }; + }; + }; + }; + /**

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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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?: + | "additional_verification" + | "business_icon" + | "business_logo" + | "customer_signature" + | "dispute_evidence" + | "finance_report_run" + | "identity_document" + | "pci_document" + | "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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /** + *

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + } & { [key: string]: any }; + /** 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`. */ + purpose: + | "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]: any }; + }; + }; + }; + /**

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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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: { + 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": { + /** 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; + /** 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; + /** The ID of the customer who will be billed when this invoice item is billed. */ + customer: string; + /** An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. */ + description?: string; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** The period associated with this invoice item. */ + period?: { + end: number; + start: number; + } & { [key: string]: any }; + /** Non-negative integer. The quantity of units for the invoice item. */ + quantity?: number; + /** 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; + /** 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[]; + /** 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; + /** 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; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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": { + /** 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; + /** An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. */ + description?: string; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** The period associated with this invoice item. */ + period?: { + end: number; + start: number; + } & { [key: string]: any }; + /** Non-negative integer. The quantity of units for the invoice item. */ + quantity?: number; + /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + /** 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; + /** 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; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** Only return invoices for the customer specified by this customer ID. */ + customer?: string; + due_date?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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: { + 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": { + /** 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; + /** 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; + /** 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`. */ + collection_method?: "charge_automatically" | "send_invoice"; + /** A list of up to 4 custom fields to be displayed on the invoice. */ + custom_fields?: (Partial< + ({ + name: string; + value: string; + } & { [key: string]: any })[] + > & + Partial<"">) & { [key: string]: any }; + /** The ID of the customer who will be billed. */ + customer: string; + /** 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; + /** 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; + /** 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; + /** The tax rates that will apply to any line item that does not have `tax_rates` set. */ + default_tax_rates?: string[]; + /** An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ + description?: string; + /** The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`. */ + due_date?: number; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Footer to be displayed on the invoice. */ + footer?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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; + /** 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; + /** 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; + }; + }; + }; + }; + /** + *

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: { + /** 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; + /** 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; + invoiceitem?: string; + metadata?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + period?: { + end: number; + start: number; + } & { [key: string]: any }; + quantity?: number; + tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; + unit_amount?: number; + unit_amount_decimal?: string; + } & { [key: string]: any })[]; + /** 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?: (Partial<"now" | "unchanged"> & Partial) & { [key: string]: any }; + /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + /** List of subscription items, each with an attached plan. */ + subscription_items?: ({ + billing_thresholds?: (Partial< + { + usage_gte: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + clear_usage?: boolean; + deleted?: boolean; + id?: string; + metadata?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + plan?: string; + quantity?: number; + tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; + } & { [key: string]: any })[]; + /** 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?: "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` 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?: (Partial<"now"> & Partial) & { [key: string]: any }; + /** 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: { + content: { + "application/json": components["schemas"]["invoice"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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: { + /** 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; + /** 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; + invoiceitem?: string; + metadata?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + period?: { + end: number; + start: number; + } & { [key: string]: any }; + quantity?: number; + tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; + unit_amount?: number; + unit_amount_decimal?: string; + } & { [key: string]: any })[]; + /** 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?: (Partial<"now" | "unchanged"> & Partial) & { [key: string]: any }; + /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + /** List of subscription items, each with an attached plan. */ + subscription_items?: ({ + billing_thresholds?: (Partial< + { + usage_gte: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + clear_usage?: boolean; + deleted?: boolean; + id?: string; + metadata?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + plan?: string; + quantity?: number; + tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; + } & { [key: string]: any })[]; + /** 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?: "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` 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?: (Partial<"now"> & Partial) & { [key: string]: any }; + /** 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: { + content: { + "application/json": { + /** Details about each object. */ + data: components["schemas"]["line_item"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /** + *

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": { + /** 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; + /** Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. */ + auto_advance?: boolean; + /** Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices. */ + collection_method?: "charge_automatically" | "send_invoice"; + /** 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?: (Partial< + ({ + name: string; + value: string; + } & { [key: string]: any })[] + > & + Partial<"">) & { [key: string]: any }; + /** 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; + /** 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; + /** 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; + /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + /** An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ + description?: string; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Footer to be displayed on the invoice. */ + footer?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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; + /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + }; + }; + }; + }; + /**

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: { + 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]: any }; + }; + }; + }; + /**

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": { + /** 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; + /** 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": { + /** Details about each object. */ + data: components["schemas"]["line_item"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** 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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** + * 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; + /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean; + /** Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. */ + paid_out_of_band?: boolean; + /** 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; + /** 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": { + /** 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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; + }; + }; + }; + /**

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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /** + *

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]: any }; + }; + }; + }; + /**

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 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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + }; + }; + }; + }; + /**

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": { + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + }; + }; + }; + }; + /**

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + }; + }; + }; + }; + /**

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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** The cardholder's billing address. */ + billing: { + address: { + city: string; + country: string; + line1: string; + line2?: string; + postal_code: string; + state?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** Additional information about a `company` cardholder. */ + company?: { + tax_id?: string; + } & { [key: string]: any }; + /** The cardholder's email address. */ + email?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Additional information about an `individual` cardholder. */ + individual?: { + dob?: { + day: number; + month: number; + year: number; + } & { [key: string]: any }; + first_name: string; + last_name: string; + verification?: { + document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** Set of key-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]: string }; + /** The cardholder's name. This will be printed on cards issued to them. */ + name: string; + /** 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; + /** 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" + )[]; + interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; + } & { [key: string]: any })[]; + spending_limits_currency?: string; + } & { [key: string]: any }; + /** Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`. */ + status?: "active" | "inactive"; + /** One of `individual` or `company`. */ + 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]: any }; + }; + }; + }; + /**

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": { + /** The cardholder's billing address. */ + billing?: { + address: { + city: string; + country: string; + line1: string; + line2?: string; + postal_code: string; + state?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** Additional information about a `company` cardholder. */ + company?: { + tax_id?: string; + } & { [key: string]: any }; + /** The cardholder's email address. */ + email?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Additional information about an `individual` cardholder. */ + individual?: { + dob?: { + day: number; + month: number; + year: number; + } & { [key: string]: any }; + first_name: string; + last_name: string; + verification?: { + document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** Set of key-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]: string }; + /** The cardholder's phone number. */ + phone_number?: string; + /** 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" + )[]; + interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; + } & { [key: string]: any })[]; + spending_limits_currency?: string; + } & { [key: string]: any }; + /** Specifies whether to permit authorizations on this cardholder's cards. */ + 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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated. */ + cardholder?: string; + /** The currency for the card. This currently must be `usd`. */ + currency: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [key: string]: string }; + /** The card this is meant to be a replacement for (if any). */ + replacement_for?: string; + /** If `replacement_for` is specified, this should indicate why that card is being replaced. */ + replacement_reason?: "damaged" | "expired" | "lost" | "stolen"; + /** The address where the card will be shipped. */ + shipping?: { + address: { + city: string; + country: string; + line1: string; + line2?: string; + postal_code: string; + state?: string; + } & { [key: string]: any }; + name: string; + service?: "express" | "priority" | "standard"; + type?: "bulk" | "individual"; + } & { [key: string]: any }; + /** 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" + )[]; + interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + /** Whether authorizations can be approved on this card. Defaults to `inactive`. */ + status?: "active" | "inactive"; + /** The type of card to issue. Possible values are `physical` or `virtual`. */ + 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]: any }; + }; + }; + }; + /**

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": { + /** Reason why the `status` of this card is `canceled`. */ + cancellation_reason?: "lost" | "stolen"; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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" + )[]; + interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; + } & { [key: string]: any })[]; + } & { [key: string]: any }; + /** 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`. */ + 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: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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.dispute"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

Creates an Issuing Dispute object.

*/ + 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": { + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [key: string]: 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]: any }; + }; + }; + }; + /**

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; + }; + }; + 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": { + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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.transaction"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + fulfilled?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + paid?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + returned?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + } & { [key: string]: any }; + /** Only return orders with the given upstream order IDs. */ + upstream_ids?: string[]; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + data: components["schemas"]["order"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** 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; + /** 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; + /** 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; + /** The email address of the customer placing the order. */ + email?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + type?: "discount" | "shipping" | "sku" | "tax"; + } & { [key: string]: any })[]; + /** Set of key-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]: string }; + /** Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. */ + shipping?: { + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + name: string; + phone?: string; + } & { [key: string]: any }; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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": { + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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; + /** Tracking information once the order has been fulfilled. */ + shipping?: { + carrier: string; + tracking_number: string; + } & { [key: string]: any }; + /** 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). */ + 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": { + /** 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; + /** 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; + /** The email address of the customer placing the order. Required if not previously specified for the order. */ + email?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [key: string]: string }; + /** 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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** List of items to return. */ + items?: (Partial< + ({ + amount?: number; + description?: string; + parent?: string; + quantity?: number; + type?: "discount" | "shipping" | "sku" | "tax"; + } & { [key: string]: any })[] + > & + Partial<"">) & { [key: string]: any }; + }; + }; + }; + }; + /**

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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /** + *

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": { + /** 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; + /** + * 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; + /** Controls when the funds will be captured from the customer's account. */ + capture_method?: "automatic" | "manual"; + /** 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; + confirmation_method?: "automatic" | "manual"; + /** 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; + /** + * 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; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** 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: { + accepted_at?: number; + offline?: { [key: string]: any }; + online?: { + ip_address: string; + user_agent: string; + } & { [key: string]: any }; + type: "offline" | "online"; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** Set of key-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]: string }; + /** 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?: (Partial & Partial<"one_off" | "recurring">) & { [key: string]: any }; + /** 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; + /** + * 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-specific configuration for this PaymentIntent. */ + payment_method_options?: { + card?: (Partial< + { + installments?: { + enabled?: boolean; + plan?: (Partial< + { + count: number; + interval: "month"; + type: "fixed_count"; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + } & { [key: string]: any }; + request_three_d_secure?: "any" | "automatic"; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + } & { [key: string]: any }; + /** 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[]; + /** Email address that the receipt for the resulting payment will be sent to. */ + receipt_email?: string; + /** 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; + /** + * 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). + */ + setup_future_usage?: "off_session" | "on_session"; + /** Shipping information for this PaymentIntent. */ + shipping?: { + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + carrier?: string; + name: string; + phone?: string; + tracking_number?: string; + } & { [key: string]: any }; + /** 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; + /** 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; + /** + * 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; + } & { [key: string]: any }; + /** 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; + /** 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]: any }; + }; + }; + }; + /** + *

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": { + /** 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; + /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + /** 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; + /** + * 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; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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-specific configuration for this PaymentIntent. */ + payment_method_options?: { + card?: (Partial< + { + installments?: { + enabled?: boolean; + plan?: (Partial< + { + count: number; + interval: "month"; + type: "fixed_count"; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + } & { [key: string]: any }; + request_three_d_secure?: "any" | "automatic"; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + } & { [key: string]: any }; + /** The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ + payment_method_types?: string[]; + /** Email address that the receipt for the resulting payment will be sent to. */ + receipt_email?: (Partial & Partial<"">) & { [key: string]: any }; + /** + * 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`. + */ + setup_future_usage?: "" | "off_session" | "on_session"; + /** Shipping information for this PaymentIntent. */ + shipping?: (Partial< + { + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + carrier?: string; + name: string; + phone?: string; + tracking_number?: string; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** 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; + /** 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; + /** 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; + } & { [key: string]: any }; + /** 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.

+ * + *

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": { + /** Reason for canceling this PaymentIntent. Possible values are `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` */ + cancellation_reason?: "abandoned" | "duplicate" | "fraudulent" | "requested_by_customer"; + /** 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 exactly seven days after they are created.

+ * + *

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": { + /** 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; + /** + * 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** 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; + /** + * 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; + } & { [key: string]: any }; + }; + }; + }; + }; + /** + *

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": { + /** The client secret of the PaymentIntent. */ + client_secret?: string; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** ID of the mandate to be used for this payment. */ + mandate?: string; + /** This hash contains details about the Mandate to create */ + mandate_data?: (Partial< + { + customer_acceptance: { + accepted_at?: number; + offline?: { [key: string]: any }; + online?: { + ip_address: string; + user_agent: string; + } & { [key: string]: any }; + type: "offline" | "online"; + } & { [key: string]: any }; + } & { [key: string]: any } + > & + Partial< + { + customer_acceptance: { + online: { + ip_address?: string; + user_agent?: string; + } & { [key: string]: any }; + type: "online"; + } & { [key: string]: any }; + } & { [key: string]: any } + >) & { [key: string]: any }; + /** 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?: (Partial & Partial<"one_off" | "recurring">) & { [key: string]: any }; + /** 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-specific configuration for this PaymentIntent. */ + payment_method_options?: { + card?: (Partial< + { + installments?: { + enabled?: boolean; + plan?: (Partial< + { + count: number; + interval: "month"; + type: "fixed_count"; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + } & { [key: string]: any }; + request_three_d_secure?: "any" | "automatic"; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + } & { [key: string]: any }; + /** The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ + payment_method_types?: string[]; + /** Email address that the receipt for the resulting payment will be sent to. */ + receipt_email?: (Partial & Partial<"">) & { [key: string]: any }; + /** + * 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; + /** + * 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`. + */ + setup_future_usage?: "" | "off_session" | "on_session"; + /** Shipping information for this PaymentIntent. */ + shipping?: (Partial< + { + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + carrier?: string; + name: string; + phone?: string; + tracking_number?: string; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ + use_stripe_sdk?: boolean; + }; + }; + }; + }; + /**

Returns a list of PaymentMethods for a given Customer

*/ + GetPaymentMethods: { + parameters: { + query: { + /** 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; + /** 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: "au_becs_debit" | "card" | "card_present" | "fpx" | "ideal" | "sepa_debit"; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + data: components["schemas"]["payment_method"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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

*/ + 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": { + /** 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; + } & { [key: string]: any }; + /** 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; + } & { [key: string]: any }; + email?: string; + name?: string; + phone?: string; + } & { [key: string]: any }; + /** 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?: (Partial< + { + cvc?: string; + exp_month: number; + exp_year: number; + number: string; + } & { [key: string]: any } + > & + Partial< + { + token: string; + } & { [key: string]: any } + >) & { [key: string]: any }; + /** The `Customer` to whom the original PaymentMethod is attached. */ + customer?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. */ + fpx?: { + 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"; + } & { [key: string]: any }; + /** If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. */ + ideal?: { + bank?: + | "abn_amro" + | "asn_bank" + | "bunq" + | "handelsbanken" + | "ing" + | "knab" + | "moneyou" + | "rabobank" + | "regiobank" + | "sns_bank" + | "triodos_bank" + | "van_lanschot"; + } & { [key: string]: any }; + /** Set of key-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]: string }; + /** The PaymentMethod to share. */ + payment_method?: string; + /** If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. */ + sepa_debit?: { + iban: string; + } & { [key: string]: any }; + /** 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) */ + type?: "au_becs_debit" | "card" | "fpx" | "ideal" | "sepa_debit"; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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 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; + } & { [key: string]: any }; + email?: string; + name?: string; + phone?: string; + } & { [key: string]: any }; + /** If this is a `card` PaymentMethod, this hash contains the user's card details. */ + card?: { + exp_month?: number; + exp_year?: number; + } & { [key: string]: any }; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. */ + sepa_debit?: { [key: string]: any }; + }; + }; + }; + }; + /** + *

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": { + /** The ID of the customer to which to attach the PaymentMethod. */ + customer: string; + /** 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": { + /** 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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + created?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /** + *

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": { + /** A positive integer in cents representing how much to payout. */ + amount: number; + /** 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; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [key: string]: string }; + /** 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).) */ + method?: "instant" | "standard"; + /** 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`. */ + source_type?: "bank_account" | "card" | "fpx"; + /** 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]: any }; + }; + }; + }; + /**

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + }; + }; + }; + }; + /**

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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": { + data: components["schemas"]["plan"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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

*/ + 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": { + /** Whether the plan is currently available for new subscriptions. Defaults to `true`. */ + active?: boolean; + /** 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`. */ + aggregate_usage?: "last_during_period" | "last_ever" | "max" | "sum"; + /** A positive integer in %s (or 0 for a free plan) representing how much to charge on a recurring basis. */ + amount?: number; + /** 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; + /** 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. */ + billing_scheme?: "per_unit" | "tiered"; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** Specifies billing frequency. Either `day`, `week`, `month` or `year`. */ + interval: "day" | "month" | "week" | "year"; + /** 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; + /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** A brief description of the plan, hidden from customers. */ + nickname?: string; + product?: (Partial< + { + active?: boolean; + id?: string; + metadata?: { [key: string]: string }; + name: string; + statement_descriptor?: string; + unit_label?: string; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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: (Partial<"inf"> & Partial) & { [key: string]: any }; + } & { [key: string]: any })[]; + /** 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. */ + tiers_mode?: "graduated" | "volume"; + /** 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; + round: "down" | "up"; + } & { [key: string]: any }; + /** 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; + /** 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`. */ + 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]: any }; + }; + }; + }; + /**

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": { + /** Whether the plan is currently available for new subscriptions. */ + active?: boolean; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** A brief description of the plan, hidden from customers. */ + nickname?: string; + /** 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; + /** 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]: any }; + }; + }; + }; + /**

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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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 of this type. */ + type?: "good" | "service"; + /** Only return products with the given url. */ + url?: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + data: components["schemas"]["product"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

Creates a new product object. To create a product for use with orders, see Products.

*/ + 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": { + /** Whether the product is currently available for purchase. Defaults to `true`. */ + active?: boolean; + /** A list of up to 5 alphanumeric attributes. */ + attributes?: string[]; + /** A short one-line description of the product, meant to be displayable to the customer. May only be set if type=`good`. */ + caption?: string; + /** 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[]; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ + images?: 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?: { [key: string]: string }; + /** 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; + /** 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; + } & { [key: string]: any }; + /** Whether this product is shipped (i.e., physical goods). Defaults to `true`. May only be set if type=`good`. */ + shippable?: boolean; + /** + * 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; + /** 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. */ + type?: "good" | "service"; + /** 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; + /** A URL of a publicly-accessible webpage for this product. May only be set if type=`good`. */ + 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]: any }; + }; + }; + }; + /**

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": { + /** Whether the product is available for purchase. */ + active?: boolean; + /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + /** A short one-line description of the product, meant to be displayable to the customer. May only be set if `type=good`. */ + caption?: string; + /** 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[]; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ + images?: (Partial & Partial<"">) & { [key: string]: any }; + /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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; + /** 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?: (Partial< + { + height: number; + length: number; + weight: number; + width: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** Whether this product is shipped (i.e., physical goods). Defaults to `true`. May only be set if `type=good`. */ + shippable?: boolean; + /** + * 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; + /** 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; + /** A URL of a publicly-accessible webpage for this product. May only be set if `type=good`. */ + url?: string; + }; + }; + }; + }; + /**

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: { + 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]: any }; + }; + }; + }; + /**

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; + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /** + *

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]: any }; + }; + }; + }; + /**

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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The value of the item (whose type must match the type of the parent value list). */ + value: string; + /** 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]: any }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** The name of the value list for use in rules. */ + alias: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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. */ + item_type?: + | "card_bin" + | "card_fingerprint" + | "case_sensitive_string" + | "country" + | "email" + | "ip_address" + | "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?: { [key: string]: string }; + /** 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]: any }; + }; + }; + }; + /**

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": { + /** The name of the value list for use in rules. */ + alias?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [key: string]: string }; + /** 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]: any }; + }; + }; + }; + /**

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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /** + *

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": { + /** 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; + /** 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; + /** An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ + description?: string; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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; + /** The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ + tax_id?: string; + /** 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": (Partial & + Partial) & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /** + *

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": { + /** 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; + /** 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; + /** ID of the card to set as the recipient's new default for payouts. */ + default_card?: string; + /** An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ + description?: string; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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; + /** 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]: any }; + }; + }; + }; + /**

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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + payment_intent?: 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]: any }; + }; + }; + }; + /** + *

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + }; + }; + }; + }; + /**

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

*/ + GetReportingReportRuns: { + parameters: { + query: { + created?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

Creates a new object and begin running the report. (Requires 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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + 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"; + 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"; + } & { [key: string]: any }; + /** 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. (Requires a live-mode API key.)

*/ + 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]: any }; + }; + }; + }; + /**

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?: string[]; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + data: components["schemas"]["reporting.report_type"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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?: 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]: any }; + }; + }; + }; + /**

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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; + }; + }; + }; + /**

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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /** + *

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": { + /** 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; + /** + * 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; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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: { + accepted_at?: number; + offline?: { [key: string]: any }; + online?: { + ip_address: string; + user_agent: string; + } & { [key: string]: any }; + type: "offline" | "online"; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** Set of key-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]: string }; + /** The Stripe account ID for which this SetupIntent is created. */ + on_behalf_of?: string; + /** ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string; + /** Payment-method-specific configuration for this SetupIntent. */ + payment_method_options?: { + card?: { + request_three_d_secure?: "any" | "automatic"; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** 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[]; + /** 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; + /** If this hash is populated, this SetupIntent will generate a single_use Mandate on success. */ + single_use?: { + amount: number; + currency: string; + } & { [key: string]: any }; + /** Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. */ + 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]: any }; + }; + }; + }; + /**

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": { + /** + * 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; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string; + /** Payment-method-specific configuration for this SetupIntent. */ + payment_method_options?: { + card?: { + request_three_d_secure?: "any" | "automatic"; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** 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_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; + }; + }; + 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": { + /** Reason for canceling this SetupIntent. Possible values are `abandoned`, `requested_by_customer`, or `duplicate` */ + cancellation_reason?: "abandoned" | "duplicate" | "requested_by_customer"; + /** 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": { + /** The client secret of the SetupIntent. */ + client_secret?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** This hash contains details about the Mandate to create */ + mandate_data?: (Partial< + { + customer_acceptance: { + accepted_at?: number; + offline?: { [key: string]: any }; + online?: { + ip_address: string; + user_agent: string; + } & { [key: string]: any }; + type: "offline" | "online"; + } & { [key: string]: any }; + } & { [key: string]: any } + > & + Partial< + { + customer_acceptance: { + online: { + ip_address?: string; + user_agent?: string; + } & { [key: string]: any }; + type: "online"; + } & { [key: string]: any }; + } & { [key: string]: any } + >) & { [key: string]: any }; + /** ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string; + /** Payment-method-specific configuration for this SetupIntent. */ + payment_method_options?: { + card?: { + request_three_d_secure?: "any" | "automatic"; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** + * 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; + }; + }; + }; + }; + /**

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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** Whether the SKU is available for purchase. Default to `true`. */ + active?: boolean; + /** 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 }; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The identifier for the SKU. Must be unique. If not provided, an identifier will be randomly generated. */ + id?: string; + /** The URL of an image for this SKU, meant to be displayable to the customer. */ + image?: string; + /** Description of the SKU's inventory. */ + inventory: { + quantity?: number; + type?: "bucket" | "finite" | "infinite"; + value?: "" | "in_stock" | "limited" | "out_of_stock"; + } & { [key: string]: any }; + /** Set of key-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]: string }; + /** The dimensions of this SKU for shipping purposes. */ + package_dimensions?: { + height: number; + length: number; + weight: number; + width: number; + } & { [key: string]: any }; + /** 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; + /** 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": (Partial & + Partial) & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /** + *

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": { + /** Whether this SKU is available for purchase. */ + active?: boolean; + /** 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 }; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The URL of an image for this SKU, meant to be displayable to the customer. */ + image?: string; + /** Description of the SKU's inventory. */ + inventory?: { + quantity?: number; + type?: "bucket" | "finite" | "infinite"; + value?: "" | "in_stock" | "limited" | "out_of_stock"; + } & { [key: string]: any }; + /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** The dimensions of this SKU for shipping purposes. */ + package_dimensions?: (Partial< + { + height: number; + length: number; + weight: number; + width: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** 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; + /** 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]: any }; + }; + }; + }; + /**

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": { + /** 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; + /** 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; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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. */ + flow?: "code_verification" | "none" | "receiver" | "redirect"; + /** Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. */ + mandate?: { + acceptance?: { + date?: number; + ip?: string; + offline?: { + contact_email: string; + } & { [key: string]: any }; + online?: { + date?: number; + ip?: string; + user_agent?: string; + } & { [key: string]: any }; + status: "accepted" | "pending" | "refused" | "revoked"; + type?: "offline" | "online"; + user_agent?: string; + } & { [key: string]: any }; + amount?: (Partial & Partial<"">) & { [key: string]: any }; + currency?: string; + interval?: "one_time" | "scheduled" | "variable"; + notification_method?: "deprecated_none" | "email" | "manual" | "none" | "stripe_email"; + } & { [key: string]: any }; + metadata?: { [key: string]: string }; + /** The source to share. */ + original_source?: string; + /** Information about the owner of the payment instrument that may be used or required by particular source types. */ + owner?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + email?: string; + name?: string; + phone?: string; + } & { [key: string]: any }; + /** Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). */ + receiver?: { + refund_attributes_method?: "email" | "manual" | "none"; + } & { [key: string]: any }; + /** Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). */ + redirect?: { + return_url: string; + } & { [key: string]: any }; + /** 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; + type?: "discount" | "shipping" | "sku" | "tax"; + } & { [key: string]: any })[]; + shipping?: { + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + carrier?: string; + name?: string; + phone?: string; + tracking_number?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** 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; + /** An optional token used to create the source. When passed, token properties will override source parameters. */ + token?: string; + /** 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; + 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]: any }; + }; + }; + }; + /** + *

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": { + /** Amount associated with the source. */ + amount?: number; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. */ + mandate?: { + acceptance?: { + date?: number; + ip?: string; + offline?: { + contact_email: string; + } & { [key: string]: any }; + online?: { + date?: number; + ip?: string; + user_agent?: string; + } & { [key: string]: any }; + status: "accepted" | "pending" | "refused" | "revoked"; + type?: "offline" | "online"; + user_agent?: string; + } & { [key: string]: any }; + amount?: (Partial & Partial<"">) & { [key: string]: any }; + currency?: string; + interval?: "one_time" | "scheduled" | "variable"; + notification_method?: "deprecated_none" | "email" | "manual" | "none" | "stripe_email"; + } & { [key: string]: any }; + /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** Information about the owner of the payment instrument that may be used or required by particular source types. */ + owner?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + email?: string; + name?: string; + phone?: string; + } & { [key: string]: any }; + /** 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; + type?: "discount" | "shipping" | "sku" | "tax"; + } & { [key: string]: any })[]; + shipping?: { + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + carrier?: string; + name?: string; + phone?: string; + tracking_number?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** 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?: (Partial< + { + usage_gte: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [key: string]: string }; + /** + * 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. + */ + payment_behavior?: "allow_incomplete" | "error_if_incomplete" | "pending_if_incomplete"; + /** The identifier of the plan to add to the subscription. */ + plan?: string; + /** 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; + /** + * 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`. + */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + /** 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; + /** The quantity you'd like to apply to the subscription item you're creating. */ + quantity?: number; + /** The identifier of the subscription to modify. */ + subscription: string; + /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + }; + }; + }; + }; + /**

Retrieves the invoice 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]: any }; + }; + }; + }; + /**

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": { + /** 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?: (Partial< + { + usage_gte: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean; + /** + * 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. + */ + payment_behavior?: "allow_incomplete" | "error_if_incomplete" | "pending_if_incomplete"; + /** The identifier of the new plan for this subscription item. */ + plan?: string; + /** 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; + /** + * 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`. + */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + /** 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; + /** The quantity you'd like to apply to the subscription item you're creating. */ + quantity?: number; + /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + }; + }; + }; + }; + /**

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": { + /** Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. */ + clear_usage?: boolean; + /** 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; + /** + * 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`. + */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + /** 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 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: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /** + *

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": { + /** 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. */ + action?: "increment" | "set"; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The usage quantity for the specified timestamp. */ + quantity: number; + /** 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; + }; + }; + }; + }; + /**

Retrieves the list of your subscription schedules.

*/ + GetSubscriptionSchedules: { + parameters: { + query: { + /** Only return subscription schedules that were created canceled the given date interval. */ + canceled_at?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** Only return subscription schedules that completed during the given date interval. */ + completed_at?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** Only return subscription schedules that were created during the given date interval. */ + created?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

Creates a new subscription schedule object. Each customer can have up to 25 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": { + /** The identifier of the customer to create the subscription schedule for. */ + customer?: string; + /** Object representing the subscription schedule's default settings. */ + default_settings?: { + billing_thresholds?: (Partial< + { + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + collection_method?: "charge_automatically" | "send_invoice"; + default_payment_method?: string; + invoice_settings?: { + days_until_due?: number; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** 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. */ + end_behavior?: "cancel" | "none" | "release" | "renew"; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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?: (Partial< + { + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + collection_method?: "charge_automatically" | "send_invoice"; + coupon?: string; + default_payment_method?: string; + default_tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; + end_date?: number; + invoice_settings?: { + days_until_due?: number; + } & { [key: string]: any }; + iterations?: number; + plans: ({ + billing_thresholds?: (Partial< + { + usage_gte: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + plan?: string; + quantity?: number; + tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; + } & { [key: string]: any })[]; + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + tax_percent?: number; + trial?: boolean; + trial_end?: number; + } & { [key: string]: any })[]; + /** 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?: (Partial & Partial<"now">) & { [key: string]: any }; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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": { + /** Object representing the subscription schedule's default settings. */ + default_settings?: { + billing_thresholds?: (Partial< + { + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + collection_method?: "charge_automatically" | "send_invoice"; + default_payment_method?: string; + invoice_settings?: { + days_until_due?: number; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** 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. */ + end_behavior?: "cancel" | "none" | "release" | "renew"; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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?: (Partial< + { + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + collection_method?: "charge_automatically" | "send_invoice"; + coupon?: string; + default_payment_method?: string; + default_tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; + end_date?: (Partial & Partial<"now">) & { [key: string]: any }; + invoice_settings?: { + days_until_due?: number; + } & { [key: string]: any }; + iterations?: number; + plans: ({ + billing_thresholds?: (Partial< + { + usage_gte: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + plan?: string; + quantity?: number; + tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; + } & { [key: string]: any })[]; + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + start_date?: (Partial & Partial<"now">) & { [key: string]: any }; + tax_percent?: number; + trial?: boolean; + trial_end?: (Partial & Partial<"now">) & { [key: string]: any }; + } & { [key: string]: any })[]; + /** 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; + /** 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`. */ + 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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + /** 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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + current_period_end?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + current_period_start?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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; + /** 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?: + | "active" + | "all" + | "canceled" + | "ended" + | "incomplete" + | "incomplete_expired" + | "past_due" + | "trialing" + | "unpaid"; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + data: components["schemas"]["subscription"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

Creates a new subscription on an existing customer. Each customer can have up to 25 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": { + /** 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; + /** 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; + /** 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; + /** 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?: (Partial< + { + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** 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; + /** Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean; + /** 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`. */ + collection_method?: "charge_automatically" | "send_invoice"; + /** 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; + /** The identifier of the customer to subscribe. */ + customer: string; + /** 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; + /** 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; + /** 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; + /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** A list of up to 20 subscription items, each with an attached plan. */ + items?: ({ + billing_thresholds?: (Partial< + { + usage_gte: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + metadata?: { [key: string]: string }; + plan?: string; + quantity?: number; + tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; + } & { [key: string]: any })[]; + /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean; + /** + * 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. + */ + payment_behavior?: "allow_incomplete" | "error_if_incomplete" | "pending_if_incomplete"; + /** 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?: (Partial< + { + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** 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; + /** + * 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`. + */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + /** 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?: (Partial<"now"> & Partial) & { [key: string]: any }; + /** 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; + /** 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; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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": { + /** 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; + /** 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). */ + billing_cycle_anchor?: "now" | "unchanged"; + /** 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?: (Partial< + { + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + /** Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean; + /** 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`. */ + collection_method?: "charge_automatically" | "send_invoice"; + /** 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; + /** 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; + /** 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; + /** 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; + /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** List of subscription items, each with an attached plan. */ + items?: ({ + billing_thresholds?: (Partial< + { + usage_gte: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + clear_usage?: boolean; + deleted?: boolean; + id?: string; + metadata?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + plan?: string; + quantity?: number; + tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; + } & { [key: string]: any })[]; + /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean; + /** If specified, payment collection for this subscription will be paused. */ + pause_collection?: (Partial< + { + behavior: "keep_as_draft" | "mark_uncollectible" | "void"; + resumes_at?: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** + * 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. + */ + payment_behavior?: "allow_incomplete" | "error_if_incomplete" | "pending_if_incomplete"; + /** 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?: (Partial< + { + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + /** 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; + /** + * 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`. + */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + /** 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; + /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + /** 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?: (Partial<"now"> & Partial) & { [key: string]: any }; + /** 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; + }; + }; + }; + }; + /** + *

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ + invoice_now?: boolean; + /** 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]: any }; + }; + }; + }; + /**

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 not active (archived) */ + active?: boolean; + /** Optional range for filtering created date */ + created?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** 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; + /** An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + description?: string; + /** The display name of the tax rate, which will be shown to users. */ + display_name: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** This specifies if the tax rate is inclusive or exclusive. */ + inclusive: boolean; + /** The jurisdiction for the tax rate. */ + jurisdiction?: 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?: { [key: string]: string }; + /** This represents the tax rate percent out of 100. */ + percentage: number; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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": { + /** 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; + /** An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + description?: string; + /** The display name of the tax rate, which will be shown to users. */ + display_name?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The jurisdiction for the tax rate. */ + jurisdiction?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + }; + }; + }; + }; + /**

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** 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; + }; + }; + }; + }; + /**

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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

Creates a new Location object.

*/ + 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": { + /** The full address of the location. */ + address: { + city?: string; + country: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + /** A name for the location. */ + display_name: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

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": { + /** The full address of the location. */ + address?: { + city?: string; + country: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + /** A name for the location. */ + display_name?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

Returns a list of Reader objects.

*/ + GetTerminalReaders: { + parameters: { + query: { + /** Filters readers by device type */ + device_type?: "bbpos_chipper2x" | "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": { + /** A list of readers */ + data: components["schemas"]["terminal.reader"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. */ + label?: string; + /** 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; + /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** The new label of the reader. */ + label?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /** + *

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": { + /** Information for the account this token will represent. */ + account?: { + business_type?: "company" | "government_entity" | "individual" | "non_profit"; + company?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + } & { [key: string]: any }; + address_kanji?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + } & { [key: string]: any }; + directors_provided?: boolean; + executives_provided?: boolean; + name?: string; + name_kana?: string; + name_kanji?: string; + owners_provided?: boolean; + phone?: 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?: { + document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + } & { [key: string]: any }; + individual?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + } & { [key: string]: any }; + address_kanji?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + } & { [key: string]: any }; + dob?: (Partial< + { + day: number; + month: number; + year: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + phone?: string; + ssn_last_4?: string; + verification?: { + additional_document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + } & { [key: string]: any }; + tos_shown_and_accepted?: boolean; + } & { [key: string]: any }; + /** The bank account this token will represent. */ + bank_account?: { + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + routing_number?: string; + } & { [key: string]: any }; + card?: (Partial< + { + 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; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Information for the person this token will represent. */ + person?: { + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } & { [key: string]: any }; + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + } & { [key: string]: any }; + address_kanji?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + } & { [key: string]: any }; + dob?: (Partial< + { + day: number; + month: number; + year: number; + } & { [key: string]: any } + > & + Partial<"">) & { [key: string]: any }; + 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + phone?: string; + relationship?: { + director?: boolean; + executive?: boolean; + owner?: boolean; + percent_ownership?: (Partial & Partial<"">) & { [key: string]: any }; + representative?: boolean; + title?: string; + } & { [key: string]: any }; + ssn_last_4?: string; + verification?: { + additional_document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + document?: { + back?: string; + front?: string; + } & { [key: string]: any }; + } & { [key: string]: any }; + } & { [key: string]: any }; + /** The PII this token will represent. */ + pii?: { + id_number?: string; + } & { [key: string]: any }; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /**

Returns a list of top-ups.

*/ + GetTopups: { + parameters: { + query: { + /** A positive integer representing how much to transfer. */ + amount?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** A positive integer representing how much to transfer. */ + amount: number; + /** 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; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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; + /** Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. */ + statement_descriptor?: string; + /** 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]: any }; + }; + }; + }; + /**

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": { + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + }; + }; + }; + }; + /**

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": { + /** 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?: (Partial< + { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } & { [key: string]: any } + > & + Partial) & { [key: string]: any }; + /** 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": { + /** Details about each object. */ + data: components["schemas"]["transfer"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** A positive integer in %s representing how much to transfer. */ + amount?: number; + /** 3-letter [ISO code for currency](https://stripe.com/docs/payouts). */ + currency: string; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** The ID of a connected Stripe account. See the Connect documentation for details. */ + destination: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: { [key: string]: string }; + /** 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; + /** The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. */ + source_type?: "bank_account" | "card" | "fpx"; + /** 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": { + /** Details about each object. */ + data: components["schemas"]["transfer_reversal"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /** + *

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": { + /** 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; + /** 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; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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]: any }; + }; + }; + }; + /** + *

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": { + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + }; + }; + }; + }; + /**

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]: any }; + }; + }; + }; + /** + *

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": { + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + }; + }; + }; + }; + /**

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"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } & { [key: string]: any }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: any }; + }; + }; + }; + /**

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": { + /** Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version. */ + 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"; + /** Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. */ + connect?: boolean; + /** An optional description of what the wehbook is used for. */ + description?: string; + /** 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" + )[]; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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]: any }; + }; + }; + }; + /**

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": { + /** An optional description of what the wehbook is used for. */ + description?: string; + /** Disable the webhook endpoint if set to true. */ + disabled?: boolean; + /** 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" + )[]; + /** Specifies which fields in the response should be expanded. */ + expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + /** 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]: any }; + }; + }; + }; +} diff --git a/tests/v3/expected/stripe.immutable.ts b/tests/v3/expected/stripe.immutable.ts index e518bb9df..9ea5ab877 100644 --- a/tests/v3/expected/stripe.immutable.ts +++ b/tests/v3/expected/stripe.immutable.ts @@ -1492,9 +1492,7 @@ export interface components { */ readonly account: { /** Business information about the account. */ - readonly business_profile?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly business_profile?: Partial | null; /** The business type. */ readonly business_type?: ("company" | "government_entity" | "individual" | "non_profit") | null; readonly capabilities?: components["schemas"]["account_capabilities"]; @@ -1514,15 +1512,15 @@ export interface components { /** External accounts (bank accounts and debit cards) currently attached to this account */ readonly external_accounts?: { /** The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ - readonly data: readonly ((Partial & - Partial) & { readonly [key: string]: any })[]; + readonly data: readonly (Partial & + Partial)[]; /** True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean; /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; /** Unique identifier for the object. */ readonly id: string; readonly individual?: components["schemas"]["person"]; @@ -1534,25 +1532,21 @@ export interface components { readonly payouts_enabled?: boolean; readonly requirements?: components["schemas"]["account_requirements"]; /** Options for customizing how the account functions within Stripe. */ - readonly settings?: (Partial & { readonly [key: string]: any }) | null; + readonly settings?: Partial | null; readonly tos_acceptance?: components["schemas"]["account_tos_acceptance"]; /** The Stripe account type. Can be `standard`, `express`, or `custom`. */ readonly type?: "custom" | "express" | "standard"; - } & { readonly [key: string]: any }; + }; readonly account_branding_settings: { /** (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. */ - readonly icon?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly icon?: (Partial & Partial) | null; /** (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. */ - readonly logo?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly logo?: (Partial & Partial) | null; /** A CSS hex color value representing the primary branding color for this account */ readonly primary_color?: string | null; /** A CSS hex color value representing the secondary branding color for this account */ readonly secondary_color?: string | null; - } & { readonly [key: string]: any }; + }; readonly account_business_profile: { /** [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. */ readonly mcc?: string | null; @@ -1561,7 +1555,7 @@ export interface components { /** Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes. */ readonly product_description?: string | null; /** A publicly available mailing address for sending support issues to. */ - readonly support_address?: (Partial & { readonly [key: string]: any }) | null; + readonly support_address?: Partial | null; /** A publicly available email address for sending support issues to. */ readonly support_email?: string | null; /** A publicly available phone number to call with support issues. */ @@ -1570,7 +1564,7 @@ export interface components { readonly support_url?: string | null; /** The business's publicly available website. */ readonly url?: string | null; - } & { readonly [key: string]: any }; + }; readonly account_capabilities: { /** 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. */ readonly au_becs_debit_payments?: "active" | "inactive" | "pending"; @@ -1586,7 +1580,7 @@ export interface components { readonly tax_reporting_us_1099_misc?: "active" | "inactive" | "pending"; /** The status of the transfers capability of the account, or whether your platform can transfer funds to the account. */ readonly transfers?: "active" | "inactive" | "pending"; - } & { readonly [key: string]: any }; + }; readonly account_capability_requirements: { /** The date the fields in `currently_due` must be collected by to keep the capability enabled for the account. */ readonly current_deadline?: number | null; @@ -1602,24 +1596,24 @@ export interface components { readonly past_due: readonly string[]; /** 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`. */ readonly pending_verification: readonly string[]; - } & { readonly [key: string]: any }; + }; readonly account_card_payments_settings: { readonly decline_on?: components["schemas"]["account_decline_charge_on"]; /** 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. */ readonly statement_descriptor_prefix?: string | null; - } & { readonly [key: string]: any }; + }; readonly account_dashboard_settings: { /** The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts. */ readonly display_name?: string | null; /** 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). */ readonly timezone?: string | null; - } & { readonly [key: string]: any }; + }; readonly account_decline_charge_on: { /** 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. */ readonly avs_failure: boolean; /** Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. */ readonly cvc_failure: boolean; - } & { readonly [key: string]: any }; + }; /** * Account Links are the means by which a Connect platform grants a connected account permission to access * Stripe-hosted applications, such as Connect Onboarding. @@ -1635,7 +1629,7 @@ export interface components { readonly object: "account_link"; /** The URL for the account link. */ readonly url: string; - } & { readonly [key: string]: any }; + }; readonly account_payments_settings: { /** 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. */ readonly statement_descriptor?: string | null; @@ -1643,14 +1637,14 @@ export interface components { readonly statement_descriptor_kana?: string | null; /** The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only) */ readonly statement_descriptor_kanji?: string | null; - } & { readonly [key: string]: any }; + }; readonly account_payout_settings: { /** 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. */ readonly debit_negative_balances: boolean; readonly schedule: components["schemas"]["transfer_schedule"]; /** 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. */ readonly statement_descriptor?: string | null; - } & { readonly [key: string]: any }; + }; readonly account_requirements: { /** 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. */ readonly current_deadline?: number | null; @@ -1666,7 +1660,7 @@ export interface components { readonly past_due?: readonly string[] | null; /** 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`. */ readonly pending_verification?: readonly string[] | null; - } & { readonly [key: string]: any }; + }; readonly account_requirements_error: { /** The code for the type of error. */ readonly code: @@ -1712,14 +1706,14 @@ export interface components { readonly reason: string; /** The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. */ readonly requirement: string; - } & { readonly [key: string]: any }; + }; readonly account_settings: { readonly branding: components["schemas"]["account_branding_settings"]; readonly card_payments: components["schemas"]["account_card_payments_settings"]; readonly dashboard: components["schemas"]["account_dashboard_settings"]; readonly payments: components["schemas"]["account_payments_settings"]; readonly payouts?: components["schemas"]["account_payout_settings"]; - } & { readonly [key: string]: any }; + }; readonly account_tos_acceptance: { /** The Unix timestamp marking when the Stripe Services Agreement was accepted by the account representative */ readonly date?: number | null; @@ -1727,7 +1721,7 @@ export interface components { readonly ip?: string | null; /** The user agent of the browser from which the Stripe Services Agreement was accepted by the account representative */ readonly user_agent?: string | null; - } & { readonly [key: string]: any }; + }; readonly address: { /** City, district, suburb, town, or village. */ readonly city?: string | null; @@ -1741,15 +1735,15 @@ export interface components { readonly postal_code?: string | null; /** State, county, province, or region. */ readonly state?: string | null; - } & { readonly [key: string]: any }; + }; readonly alipay_account: { /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number; /** The ID of the customer associated with this Alipay Account. */ readonly customer?: - | ((Partial & + | (Partial & Partial & - Partial) & { readonly [key: string]: any }) + Partial) | null; /** Uniquely identifies the account and will be the same across all Alipay account objects that are linked to the same Alipay account. */ readonly fingerprint: string; @@ -1771,7 +1765,7 @@ export interface components { readonly used: boolean; /** The username for the Alipay account. */ readonly username: string; - } & { readonly [key: string]: any }; + }; readonly api_errors: { /** For card errors, the ID of the failed charge. */ readonly charge?: string; @@ -1789,9 +1783,9 @@ export interface components { readonly payment_method?: components["schemas"]["payment_method"]; readonly setup_intent?: components["schemas"]["setup_intent"]; /** The source object for errors returned on a request involving a source. */ - readonly source?: (Partial & + readonly source?: Partial & Partial & - Partial) & { readonly [key: string]: any }; + Partial; /** 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` */ readonly type: | "api_connection_error" @@ -1801,7 +1795,7 @@ export interface components { | "idempotency_error" | "invalid_request_error" | "rate_limit_error"; - } & { readonly [key: string]: any }; + }; readonly apple_pay_domain: { /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number; @@ -1812,7 +1806,7 @@ export interface components { readonly livemode: boolean; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "apple_pay_domain"; - } & { readonly [key: string]: any }; + }; readonly application: { /** Unique identifier for the object. */ readonly id: string; @@ -1820,24 +1814,20 @@ export interface components { readonly name?: string | null; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "application"; - } & { readonly [key: string]: any }; + }; readonly application_fee: { /** ID of the Stripe account this fee was taken from. */ - readonly account: (Partial & Partial) & { readonly [key: string]: any }; + readonly account: Partial & Partial; /** Amount earned, in %s. */ readonly amount: number; /** Amount in %s refunded (can be less than the amount attribute on the fee if a partial refund was issued) */ readonly amount_refunded: number; /** ID of the Connect application that earned the fee. */ - readonly application: (Partial & Partial) & { - readonly [key: string]: any; - }; + readonly application: Partial & Partial; /** Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). */ - readonly balance_transaction?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly balance_transaction?: (Partial & Partial) | null; /** ID of the charge that the application fee was taken from. */ - readonly charge: (Partial & Partial) & { readonly [key: string]: any }; + readonly charge: Partial & Partial; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number; /** 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). */ @@ -1849,9 +1839,7 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "application_fee"; /** ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter. */ - readonly originating_transaction?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly originating_transaction?: (Partial & Partial) | null; /** Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. */ readonly refunded: boolean; /** A list of refunds that have been applied to the fee. */ @@ -1864,8 +1852,8 @@ export interface components { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** * This is an object representing your Stripe balance. You can retrieve it to see * the balance currently on your Stripe account. @@ -1890,14 +1878,14 @@ export interface components { readonly object: "balance"; /** 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. */ readonly pending: readonly components["schemas"]["balance_amount"][]; - } & { readonly [key: string]: any }; + }; readonly balance_amount: { /** Balance amount. */ readonly amount: number; /** 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). */ readonly currency: string; readonly source_types?: components["schemas"]["balance_amount_by_source_type"]; - } & { readonly [key: string]: any }; + }; readonly balance_amount_by_source_type: { /** Amount for bank account. */ readonly bank_account?: number; @@ -1905,7 +1893,7 @@ export interface components { readonly card?: number; /** Amount for FPX. */ readonly fpx?: number; - } & { readonly [key: string]: any }; + }; /** * 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. @@ -1939,7 +1927,7 @@ export interface components { readonly reporting_category: string; /** The Stripe object to which this transaction is related. */ readonly source?: - | ((Partial & + | (Partial & Partial & Partial & Partial & @@ -1954,7 +1942,7 @@ export interface components { Partial & Partial & Partial & - Partial) & { readonly [key: string]: any }) + Partial) | null; /** If the transaction's net funds are available in the Stripe balance yet. Either `available` or `pending`. */ readonly status: string; @@ -1989,7 +1977,7 @@ export interface components { | "transfer_cancel" | "transfer_failure" | "transfer_refund"; - } & { readonly [key: string]: any }; + }; /** * These bank accounts are payment methods on `Customer` objects. * @@ -2001,9 +1989,7 @@ export interface components { */ readonly bank_account: { /** The ID of the account that the bank account is associated with. */ - readonly account?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly account?: (Partial & Partial) | null; /** The name of the person or business that owns the bank account. */ readonly account_holder_name?: string | null; /** The type of entity that holds the account. This can be either `individual` or `company`. */ @@ -2016,9 +2002,9 @@ export interface components { readonly currency: string; /** The ID of the customer that the bank account is associated with. */ readonly customer?: - | ((Partial & + | (Partial & Partial & - Partial) & { readonly [key: string]: any }) + Partial) | null; /** Whether this bank account is the default external account for its currency. */ readonly default_for_currency?: boolean | null; @@ -2040,17 +2026,17 @@ export interface components { * 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. */ readonly status: string; - } & { readonly [key: string]: any }; + }; readonly billing_details: { /** Billing address. */ - readonly address?: (Partial & { readonly [key: string]: any }) | null; + readonly address?: Partial | null; /** Email address. */ readonly email?: string | null; /** Full name. */ readonly name?: string | null; /** Billing phone number (including extension). */ readonly phone?: string | null; - } & { readonly [key: string]: any }; + }; /** * A Session describes the instantiation of the Self-serve Portal for * a particular customer. By visiting the Self-serve Portal's URL, the customer @@ -2075,7 +2061,7 @@ export interface components { readonly return_url: string; /** The short-lived URL of the session giving customers access to the self-serve portal. */ readonly url: string; - } & { readonly [key: string]: any }; + }; readonly bitcoin_receiver: { /** True when this bitcoin receiver has received a non-zero amount of bitcoin. */ readonly active: boolean; @@ -2125,12 +2111,12 @@ export interface components { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; /** This receiver contains uncaptured funds that can be used for a payment or refunded. */ readonly uncaptured_funds: boolean; /** Indicate if this source is used for payment. */ readonly used_for_payment?: boolean | null; - } & { readonly [key: string]: any }; + }; readonly bitcoin_transaction: { /** The amount of `currency` that the transaction was converted to in real-time. */ readonly amount: number; @@ -2146,7 +2132,7 @@ export interface components { readonly object: "bitcoin_transaction"; /** The receiver to which this transaction was sent. */ readonly receiver: string; - } & { readonly [key: string]: any }; + }; /** * This is an object representing a capability for a Stripe account. * @@ -2154,7 +2140,7 @@ export interface components { */ readonly capability: { /** The account for which the capability enables functionality. */ - readonly account: (Partial & Partial) & { readonly [key: string]: any }; + readonly account: Partial & Partial; /** The identifier for the capability. */ readonly id: string; /** String representing the object's type. Objects of the same type share the same value. */ @@ -2166,7 +2152,7 @@ export interface components { readonly requirements?: components["schemas"]["account_capability_requirements"]; /** The status of the capability. Can be `active`, `inactive`, `pending`, or `unrequested`. */ readonly status: "active" | "disabled" | "inactive" | "pending" | "unrequested"; - } & { readonly [key: string]: any }; + }; /** * 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 @@ -2176,9 +2162,7 @@ export interface components { */ readonly card: { /** 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. */ - readonly account?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly account?: (Partial & Partial) | null; /** City/District/Suburb/Town/Village. */ readonly address_city?: string | null; /** Billing address country, if provided when creating card. */ @@ -2204,9 +2188,9 @@ export interface components { readonly currency?: string | null; /** 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. */ readonly customer?: - | ((Partial & + | (Partial & Partial & - Partial) & { readonly [key: string]: any }) + Partial) | null; /** If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. */ readonly cvc_check?: string | null; @@ -2233,12 +2217,10 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "card"; /** 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. */ - readonly recipient?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly recipient?: (Partial & Partial) | null; /** 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. */ readonly tokenization_method?: string | null; - } & { readonly [key: string]: any }; + }; readonly card_mandate_payment_method_details: { readonly [key: string]: any }; /** * To charge a credit or a debit card, you create a `Charge` object. You can @@ -2253,19 +2235,13 @@ export interface components { /** Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued). */ readonly amount_refunded: number; /** ID of the Connect application that created the charge. */ - readonly application?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly application?: (Partial & Partial) | null; /** The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. */ - readonly application_fee?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly application_fee?: (Partial & Partial) | null; /** 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. */ readonly application_fee_amount?: number | null; /** ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). */ - readonly balance_transaction?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly balance_transaction?: (Partial & Partial) | null; readonly billing_details: components["schemas"]["billing_details"]; /** 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. */ readonly calculated_statement_descriptor?: string | null; @@ -2277,9 +2253,9 @@ export interface components { readonly currency: string; /** ID of the customer this charge is for if one exists. */ readonly customer?: - | ((Partial & + | (Partial & Partial & - Partial) & { readonly [key: string]: any }) + Partial) | null; /** An arbitrary string attached to the object. Often useful for displaying to users. */ readonly description?: string | null; @@ -2290,15 +2266,11 @@ export interface components { /** Message to user further explaining reason for charge failure if available. */ readonly failure_message?: string | null; /** Information on fraud assessments for the charge. */ - readonly fraud_details?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly fraud_details?: Partial | null; /** Unique identifier for the object. */ readonly id: string; /** ID of the invoice this charge is for if one exists. */ - readonly invoice?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly invoice?: (Partial & Partial) | null; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ readonly livemode: boolean; /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -2306,27 +2278,19 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "charge"; /** 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. */ - readonly on_behalf_of?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly on_behalf_of?: (Partial & Partial) | null; /** ID of the order this charge is for if one exists. */ - readonly order?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly order?: (Partial & Partial) | null; /** Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. */ - readonly outcome?: (Partial & { readonly [key: string]: any }) | null; + readonly outcome?: Partial | null; /** `true` if the charge succeeded, or was successfully authorized for later capture. */ readonly paid: boolean; /** ID of the PaymentIntent associated with this charge, if one exists. */ - readonly payment_intent?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly payment_intent?: (Partial & Partial) | null; /** ID of the payment method used in this charge. */ readonly payment_method?: string | null; /** Details about the payment method at the time of the transaction. */ - readonly payment_method_details?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly payment_method_details?: Partial | null; /** This is the email address that the receipt for this charge was sent to. */ readonly receipt_email?: string | null; /** 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. */ @@ -2345,17 +2309,13 @@ export interface components { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; /** ID of the review associated with this charge if one exists. */ - readonly review?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly review?: (Partial & Partial) | null; /** Shipping information for the charge. */ - readonly shipping?: (Partial & { readonly [key: string]: any }) | null; + readonly shipping?: Partial | null; /** 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. */ - readonly source_transfer?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly source_transfer?: (Partial & Partial) | null; /** 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. */ readonly statement_descriptor?: string | null; /** 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. */ @@ -2363,22 +2323,18 @@ export interface components { /** The status of the payment is either `succeeded`, `pending`, or `failed`. */ readonly status: string; /** ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). */ - readonly transfer?: (Partial & Partial) & { - readonly [key: string]: any; - }; + readonly transfer?: Partial & Partial; /** 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. */ - readonly transfer_data?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly transfer_data?: Partial | null; /** 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. */ readonly transfer_group?: string | null; - } & { readonly [key: string]: any }; + }; readonly charge_fraud_details: { /** Assessments from Stripe. If set, the value is `fraudulent`. */ readonly stripe_report?: string; /** Assessments reported by you. If set, possible values of are `safe` and `fraudulent`. */ readonly user_report?: string; - } & { readonly [key: string]: any }; + }; readonly charge_outcome: { /** 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. */ readonly network_status?: string | null; @@ -2389,20 +2345,18 @@ export interface components { /** 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. */ readonly risk_score?: number; /** The ID of the Radar rule that matched the payment, if applicable. */ - readonly rule?: (Partial & Partial) & { readonly [key: string]: any }; + readonly rule?: Partial & Partial; /** A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer. */ readonly seller_message?: string | null; /** 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. */ readonly type: string; - } & { readonly [key: string]: any }; + }; readonly charge_transfer_data: { /** The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. */ readonly amount?: number | null; /** ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. */ - readonly destination: (Partial & Partial) & { - readonly [key: string]: any; - }; - } & { readonly [key: string]: any }; + readonly destination: Partial & Partial; + }; /** * 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). @@ -2439,9 +2393,7 @@ export interface components { * during the session unless an existing customer was provided when * the session was created. */ - readonly customer?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly customer?: (Partial & Partial) | null; /** * 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. @@ -2488,26 +2440,20 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "checkout.session"; /** The ID of the PaymentIntent for Checkout Sessions in `payment` mode. */ - readonly payment_intent?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly payment_intent?: (Partial & Partial) | null; /** * A list of the types of payment methods (e.g. card) this Checkout * Session is allowed to accept. */ readonly payment_method_types: readonly string[]; /** The ID of the SetupIntent for Checkout Sessions in `setup` mode. */ - readonly setup_intent?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly setup_intent?: (Partial & Partial) | null; /** Shipping information for this Checkout Session. */ - readonly shipping?: (Partial & { readonly [key: string]: any }) | null; + readonly shipping?: Partial | null; /** When set, provides configuration for Checkout to collect a shipping address from a customer. */ - readonly shipping_address_collection?: - | (Partial & { - readonly [key: string]: any; - }) - | null; + readonly shipping_address_collection?: Partial< + components["schemas"]["payment_pages_payment_page_resources_shipping_address_collection"] + > | null; /** * 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 @@ -2516,15 +2462,13 @@ export interface components { */ readonly submit_type?: ("auto" | "book" | "donate" | "pay") | null; /** The ID of the subscription for Checkout Sessions in `subscription` mode. */ - readonly subscription?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly subscription?: (Partial & Partial) | null; /** * The URL the customer will be directed to after the payment or * subscription creation is successful. */ readonly success_url: string; - } & { readonly [key: string]: any }; + }; readonly checkout_session_custom_display_item_description: { /** The description of the line item. */ readonly description?: string | null; @@ -2532,7 +2476,7 @@ export interface components { readonly images?: readonly string[] | null; /** The name of the line item. */ readonly name: string; - } & { readonly [key: string]: any }; + }; readonly checkout_session_display_item: { /** Amount for the display item. */ readonly amount?: number; @@ -2545,23 +2489,21 @@ export interface components { readonly sku?: components["schemas"]["sku"]; /** The type of display item. One of `custom`, `plan` or `sku` */ readonly type?: string; - } & { readonly [key: string]: any }; + }; readonly connect_collection_transfer: { /** Amount transferred, in %s. */ readonly amount: number; /** 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). */ readonly currency: string; /** ID of the account that funds are being collected for. */ - readonly destination: (Partial & Partial) & { - readonly [key: string]: any; - }; + readonly destination: Partial & Partial; /** Unique identifier for the object. */ readonly id: string; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ readonly livemode: boolean; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "connect_collection_transfer"; - } & { readonly [key: string]: any }; + }; /** * Stripe needs to collect certain pieces of information about each account * created. These requirements can differ depending on the account's country. The @@ -2586,17 +2528,17 @@ export interface components { /** Countries that can accept transfers from the specified country. */ readonly supported_transfer_countries: readonly string[]; readonly verification_fields: components["schemas"]["country_spec_verification_fields"]; - } & { readonly [key: string]: any }; + }; readonly country_spec_verification_field_details: { /** Additional fields which are only required for some users. */ readonly additional: readonly string[]; /** Fields which every account must eventually provide. */ readonly minimum: readonly string[]; - } & { readonly [key: string]: any }; + }; readonly country_spec_verification_fields: { readonly company: components["schemas"]["country_spec_verification_field_details"]; readonly individual: components["schemas"]["country_spec_verification_field_details"]; - } & { readonly [key: string]: any }; + }; /** * 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 @@ -2633,7 +2575,7 @@ export interface components { readonly times_redeemed: number; /** Taking account of the above properties, whether this coupon can still be applied to a customer. */ readonly valid: boolean; - } & { readonly [key: string]: any }; + }; /** * Issue a credit note to adjust an invoice's amount after the invoice is finalized. * @@ -2647,21 +2589,17 @@ export interface components { /** 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). */ readonly currency: string; /** ID of the customer. */ - readonly customer: (Partial & Partial) & { - readonly [key: string]: any; - }; + readonly customer: Partial & Partial; /** Customer balance transaction related to this credit note. */ readonly customer_balance_transaction?: - | ((Partial & Partial) & { - readonly [key: string]: any; - }) + | (Partial & Partial) | null; /** The integer amount in **%s** representing the amount of the discount that was credited. */ readonly discount_amount: number; /** Unique identifier for the object. */ readonly id: string; /** ID of the invoice. */ - readonly invoice: (Partial & Partial) & { readonly [key: string]: any }; + readonly invoice: Partial & Partial; /** Line items that make up the credit note */ readonly lines: { /** Details about each object. */ @@ -2672,7 +2610,7 @@ export interface components { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ readonly livemode: boolean; /** Customer-facing text that appears on the credit note PDF. */ @@ -2690,9 +2628,7 @@ export interface components { /** Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` */ readonly reason?: ("duplicate" | "fraudulent" | "order_change" | "product_unsatisfactory") | null; /** Refund related to this credit note. */ - readonly refund?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly refund?: (Partial & Partial) | null; /** 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). */ readonly status: "issued" | "void"; /** The integer amount in **%s** representing the amount of the credit note, excluding tax and discount. */ @@ -2705,7 +2641,7 @@ export interface components { readonly type: "post_payment" | "pre_payment"; /** The time that the credit note was voided. */ readonly voided_at?: number | null; - } & { readonly [key: string]: any }; + }; readonly credit_note_line_item: { /** The integer amount in **%s** representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. */ readonly amount: number; @@ -2733,17 +2669,15 @@ export interface components { readonly unit_amount?: number | null; /** Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. */ readonly unit_amount_decimal?: string | null; - } & { readonly [key: string]: any }; + }; readonly credit_note_tax_amount: { /** The amount, in %s, of the tax. */ readonly amount: number; /** Whether this tax amount is inclusive or exclusive. */ readonly inclusive: boolean; /** The tax rate that was applied to get this tax amount. */ - readonly tax_rate: (Partial & Partial) & { - readonly [key: string]: any; - }; - } & { readonly [key: string]: any }; + readonly tax_rate: Partial & Partial; + }; /** * `Customer` objects allow you to perform recurring charges, and to track * multiple charges, that are associated with the same customer. The API allows @@ -2754,7 +2688,7 @@ export interface components { */ readonly customer: { /** The customer's address. */ - readonly address?: (Partial & { readonly [key: string]: any }) | null; + readonly address?: Partial | null; /** 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. */ readonly balance?: number; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ @@ -2767,19 +2701,19 @@ export interface components { * 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. */ readonly default_source?: - | ((Partial & + | (Partial & Partial & Partial & Partial & Partial & - Partial) & { readonly [key: string]: any }) + Partial) | null; /** 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. */ readonly delinquent?: boolean | null; /** An arbitrary string attached to the object. Often useful for displaying to users. */ readonly description?: string | null; /** Describes the current discount active on the customer, if there is one. */ - readonly discount?: (Partial & { readonly [key: string]: any }) | null; + readonly discount?: Partial | null; /** The customer's email address. */ readonly email?: string | null; /** Unique identifier for the object. */ @@ -2802,22 +2736,22 @@ export interface components { /** The customer's preferred locales (languages), ordered by preference. */ readonly preferred_locales?: readonly string[] | null; /** Mailing and shipping address for the customer. Appears on invoices emailed to this customer. */ - readonly shipping?: (Partial & { readonly [key: string]: any }) | null; + readonly shipping?: Partial | null; /** The customer's payment sources, if any. */ readonly sources: { /** Details about each object. */ - readonly data: readonly ((Partial & + readonly data: readonly (Partial & Partial & Partial & Partial & - Partial) & { readonly [key: string]: any })[]; + Partial)[]; /** True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean; /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; /** The customer's current subscriptions, if any. */ readonly subscriptions?: { /** Details about each object. */ @@ -2828,7 +2762,7 @@ export interface components { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; /** 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"**. */ readonly tax_exempt?: ("exempt" | "none" | "reverse") | null; /** The customer's tax IDs. */ @@ -2841,8 +2775,8 @@ export interface components { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; readonly customer_acceptance: { /** The time at which the customer accepted the Mandate. */ readonly accepted_at?: number | null; @@ -2850,7 +2784,7 @@ export interface components { readonly online?: components["schemas"]["online_acceptance"]; /** The type of customer acceptance information included with the Mandate. One of `online` or `offline`. */ readonly type: "offline" | "online"; - } & { readonly [key: string]: any }; + }; /** * 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. @@ -2865,15 +2799,11 @@ export interface components { /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number; /** The ID of the credit note (if any) related to the transaction. */ - readonly credit_note?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly credit_note?: (Partial & Partial) | null; /** 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). */ readonly currency: string; /** The ID of the customer the transaction belongs to. */ - readonly customer: (Partial & Partial) & { - readonly [key: string]: any; - }; + readonly customer: Partial & Partial; /** An arbitrary string attached to the object. Often useful for displaying to users. */ readonly description?: string | null; /** 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. */ @@ -2881,9 +2811,7 @@ export interface components { /** Unique identifier for the object. */ readonly id: string; /** The ID of the invoice (if any) related to the transaction. */ - readonly invoice?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly invoice?: (Partial & Partial) | null; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ readonly livemode: boolean; /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -2901,7 +2829,7 @@ export interface components { | "migration" | "unapplied_from_invoice" | "unspent_receiver_credit"; - } & { readonly [key: string]: any }; + }; readonly deleted_account: { /** Always true for a deleted object */ readonly deleted: true; @@ -2909,7 +2837,7 @@ export interface components { readonly id: string; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "account"; - } & { readonly [key: string]: any }; + }; readonly deleted_alipay_account: { /** Always true for a deleted object */ readonly deleted: true; @@ -2917,7 +2845,7 @@ export interface components { readonly id: string; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "alipay_account"; - } & { readonly [key: string]: any }; + }; readonly deleted_apple_pay_domain: { /** Always true for a deleted object */ readonly deleted: true; @@ -2925,7 +2853,7 @@ export interface components { readonly id: string; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "apple_pay_domain"; - } & { readonly [key: string]: any }; + }; readonly deleted_bank_account: { /** Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ readonly currency?: string | null; @@ -2935,7 +2863,7 @@ export interface components { readonly id: string; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "bank_account"; - } & { readonly [key: string]: any }; + }; readonly deleted_bitcoin_receiver: { /** Always true for a deleted object */ readonly deleted: true; @@ -2943,7 +2871,7 @@ export interface components { readonly id: string; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "bitcoin_receiver"; - } & { readonly [key: string]: any }; + }; readonly deleted_card: { /** Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ readonly currency?: string | null; @@ -2953,7 +2881,7 @@ export interface components { readonly id: string; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "card"; - } & { readonly [key: string]: any }; + }; readonly deleted_coupon: { /** Always true for a deleted object */ readonly deleted: true; @@ -2961,7 +2889,7 @@ export interface components { readonly id: string; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "coupon"; - } & { readonly [key: string]: any }; + }; readonly deleted_customer: { /** Always true for a deleted object */ readonly deleted: true; @@ -2969,15 +2897,15 @@ export interface components { readonly id: string; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "customer"; - } & { readonly [key: string]: any }; + }; readonly deleted_discount: { /** Always true for a deleted object */ readonly deleted: true; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "discount"; - } & { readonly [key: string]: any }; - readonly deleted_external_account: (Partial & - Partial) & { readonly [key: string]: any }; + }; + readonly deleted_external_account: Partial & + Partial; readonly deleted_invoice: { /** Always true for a deleted object */ readonly deleted: true; @@ -2985,7 +2913,7 @@ export interface components { readonly id: string; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "invoice"; - } & { readonly [key: string]: any }; + }; readonly deleted_invoiceitem: { /** Always true for a deleted object */ readonly deleted: true; @@ -2993,11 +2921,11 @@ export interface components { readonly id: string; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "invoiceitem"; - } & { readonly [key: string]: any }; - readonly deleted_payment_source: (Partial & + }; + readonly deleted_payment_source: Partial & Partial & Partial & - Partial) & { readonly [key: string]: any }; + Partial; readonly deleted_person: { /** Always true for a deleted object */ readonly deleted: true; @@ -3005,7 +2933,7 @@ export interface components { readonly id: string; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "person"; - } & { readonly [key: string]: any }; + }; readonly deleted_plan: { /** Always true for a deleted object */ readonly deleted: true; @@ -3013,7 +2941,7 @@ export interface components { readonly id: string; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "plan"; - } & { readonly [key: string]: any }; + }; readonly deleted_product: { /** Always true for a deleted object */ readonly deleted: true; @@ -3021,7 +2949,7 @@ export interface components { readonly id: string; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "product"; - } & { readonly [key: string]: any }; + }; readonly "deleted_radar.value_list": { /** Always true for a deleted object */ readonly deleted: true; @@ -3029,7 +2957,7 @@ export interface components { readonly id: string; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "radar.value_list"; - } & { readonly [key: string]: any }; + }; readonly "deleted_radar.value_list_item": { /** Always true for a deleted object */ readonly deleted: true; @@ -3037,7 +2965,7 @@ export interface components { readonly id: string; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "radar.value_list_item"; - } & { readonly [key: string]: any }; + }; readonly deleted_recipient: { /** Always true for a deleted object */ readonly deleted: true; @@ -3045,7 +2973,7 @@ export interface components { readonly id: string; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "recipient"; - } & { readonly [key: string]: any }; + }; readonly deleted_sku: { /** Always true for a deleted object */ readonly deleted: true; @@ -3053,7 +2981,7 @@ export interface components { readonly id: string; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "sku"; - } & { readonly [key: string]: any }; + }; readonly deleted_subscription_item: { /** Always true for a deleted object */ readonly deleted: true; @@ -3061,7 +2989,7 @@ export interface components { readonly id: string; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "subscription_item"; - } & { readonly [key: string]: any }; + }; readonly deleted_tax_id: { /** Always true for a deleted object */ readonly deleted: true; @@ -3069,7 +2997,7 @@ export interface components { readonly id: string; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "tax_id"; - } & { readonly [key: string]: any }; + }; readonly "deleted_terminal.location": { /** Always true for a deleted object */ readonly deleted: true; @@ -3077,7 +3005,7 @@ export interface components { readonly id: string; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "terminal.location"; - } & { readonly [key: string]: any }; + }; readonly "deleted_terminal.reader": { /** Always true for a deleted object */ readonly deleted: true; @@ -3085,7 +3013,7 @@ export interface components { readonly id: string; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "terminal.reader"; - } & { readonly [key: string]: any }; + }; readonly deleted_webhook_endpoint: { /** Always true for a deleted object */ readonly deleted: true; @@ -3093,7 +3021,7 @@ export interface components { readonly id: string; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "webhook_endpoint"; - } & { readonly [key: string]: any }; + }; readonly delivery_estimate: { /** If `type` is `"exact"`, `date` will be the expected delivery date in the format YYYY-MM-DD. */ readonly date?: string; @@ -3103,7 +3031,7 @@ export interface components { readonly latest?: string; /** The type of estimate. Must be either `"range"` or `"exact"`. */ readonly type: string; - } & { readonly [key: string]: any }; + }; /** * A discount represents the actual application of a coupon to a particular * customer. It contains information about when the discount began and when it @@ -3115,9 +3043,9 @@ export interface components { readonly coupon: components["schemas"]["coupon"]; /** The ID of the customer associated with this discount. */ readonly customer?: - | ((Partial & + | (Partial & Partial & - Partial) & { readonly [key: string]: any }) + Partial) | null; /** 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. */ readonly end?: number | null; @@ -3127,7 +3055,7 @@ export interface components { readonly start: number; /** The subscription that this coupon is applied to, if it is applied to a particular subscription. */ readonly subscription?: string | null; - } & { readonly [key: string]: any }; + }; /** * 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 @@ -3143,7 +3071,7 @@ export interface components { /** List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. */ readonly balance_transactions: readonly components["schemas"]["balance_transaction"][]; /** ID of the charge that was disputed. */ - readonly charge: (Partial & Partial) & { readonly [key: string]: any }; + readonly charge: Partial & Partial; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number; /** 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). */ @@ -3161,9 +3089,7 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "dispute"; /** ID of the PaymentIntent that was disputed. */ - readonly payment_intent?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly payment_intent?: (Partial & Partial) | null; /** 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). */ readonly reason: string; /** Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `charge_refunded`, `won`, or `lost`. */ @@ -3176,24 +3102,20 @@ export interface components { | "warning_needs_response" | "warning_under_review" | "won"; - } & { readonly [key: string]: any }; + }; readonly dispute_evidence: { /** 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. */ readonly access_activity_log?: string | null; /** The billing address provided by the customer. */ readonly billing_address?: string | null; /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. */ - readonly cancellation_policy?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly cancellation_policy?: (Partial & Partial) | null; /** An explanation of how and when the customer was shown your refund policy prior to purchase. */ readonly cancellation_policy_disclosure?: string | null; /** A justification for why the customer's subscription was not canceled. */ readonly cancellation_rebuttal?: string | null; /** (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. */ - readonly customer_communication?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly customer_communication?: (Partial & Partial) | null; /** The email address of the customer. */ readonly customer_email_address?: string | null; /** The name of the customer. */ @@ -3201,13 +3123,9 @@ export interface components { /** The IP address that the customer used when making the purchase. */ readonly customer_purchase_ip?: string | null; /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. */ - readonly customer_signature?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly customer_signature?: (Partial & Partial) | null; /** (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. */ - readonly duplicate_charge_documentation?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly duplicate_charge_documentation?: (Partial & Partial) | null; /** An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. */ readonly duplicate_charge_explanation?: string | null; /** The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. */ @@ -3215,13 +3133,9 @@ export interface components { /** A description of the product or service that was sold. */ readonly product_description?: string | null; /** (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. */ - readonly receipt?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly receipt?: (Partial & Partial) | null; /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. */ - readonly refund_policy?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly refund_policy?: (Partial & Partial) | null; /** Documentation demonstrating that the customer was shown your refund policy prior to purchase. */ readonly refund_policy_disclosure?: string | null; /** A justification for why the customer is not entitled to a refund. */ @@ -3229,9 +3143,7 @@ export interface components { /** The date on which the customer received or began receiving the purchased service, in a clear human-readable format. */ readonly service_date?: string | null; /** (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. */ - readonly service_documentation?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly service_documentation?: (Partial & Partial) | null; /** The address to which a physical product was shipped. You should try to include as complete address information as possible. */ readonly shipping_address?: string | null; /** 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. */ @@ -3239,18 +3151,14 @@ export interface components { /** The date on which a physical product began its route to the shipping address, in a clear human-readable format. */ readonly shipping_date?: string | null; /** (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. */ - readonly shipping_documentation?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly shipping_documentation?: (Partial & Partial) | null; /** 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. */ readonly shipping_tracking_number?: string | null; /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. */ - readonly uncategorized_file?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly uncategorized_file?: (Partial & Partial) | null; /** Any additional evidence or statements. */ readonly uncategorized_text?: string | null; - } & { readonly [key: string]: any }; + }; readonly dispute_evidence_details: { /** 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. */ readonly due_by?: number | null; @@ -3260,7 +3168,7 @@ export interface components { readonly past_due: boolean; /** The number of times evidence has been submitted. Typically, you may only submit evidence once. */ readonly submission_count: number; - } & { readonly [key: string]: any }; + }; readonly ephemeral_key: { /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number; @@ -3274,11 +3182,11 @@ export interface components { readonly object: "ephemeral_key"; /** The key's secret. You can use this value to make authorized requests to the Stripe API. */ readonly secret?: string; - } & { readonly [key: string]: any }; + }; /** An error response from the Stripe API */ readonly error: { readonly error: components["schemas"]["api_errors"]; - } & { readonly [key: string]: any }; + }; /** * 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` @@ -3327,12 +3235,10 @@ export interface components { /** Number of webhooks that have yet to be successfully delivered (i.e., to return a 20x response) to the URLs you've specified. */ readonly pending_webhooks: number; /** Information on the API request that instigated the event. */ - readonly request?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly request?: Partial | null; /** Description of the event (e.g., `invoice.created` or `charge.refunded`). */ readonly type: string; - } & { readonly [key: string]: any }; + }; /** * `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 @@ -3353,9 +3259,8 @@ export interface components { readonly object: "exchange_rate"; /** 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. */ readonly rates: { readonly [key: string]: number }; - } & { readonly [key: string]: any }; - readonly external_account: (Partial & - Partial) & { readonly [key: string]: any }; + }; + readonly external_account: Partial & Partial; readonly fee: { /** Amount of the fee, in cents. */ readonly amount: number; @@ -3367,7 +3272,7 @@ export interface components { readonly description?: string | null; /** Type of the fee, one of: `application_fee`, `stripe_fee` or `tax`. */ readonly type: string; - } & { readonly [key: string]: any }; + }; /** * `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 @@ -3379,24 +3284,20 @@ export interface components { /** Amount, in %s. */ readonly amount: number; /** Balance transaction that describes the impact on your account balance. */ - readonly balance_transaction?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly balance_transaction?: (Partial & Partial) | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number; /** 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). */ readonly currency: string; /** ID of the application fee that was refunded. */ - readonly fee: (Partial & Partial) & { - readonly [key: string]: any; - }; + readonly fee: Partial & Partial; /** Unique identifier for the object. */ readonly id: 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. */ readonly metadata: { readonly [key: string]: string }; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "fee_refund"; - } & { readonly [key: string]: any }; + }; /** * 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) @@ -3414,18 +3315,16 @@ export interface components { /** Unique identifier for the object. */ readonly id: string; /** A list of [file links](https://stripe.com/docs/api#file_links) that point at this file. */ - readonly links?: - | ({ - /** Details about each object. */ - readonly data: readonly components["schemas"]["file_link"][]; - /** True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - readonly object: "list"; - /** The URL where this list can be accessed. */ - readonly url: string; - } & { readonly [key: string]: any }) - | null; + readonly links?: { + /** Details about each object. */ + readonly data: readonly components["schemas"]["file_link"][]; + /** True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + readonly object: "list"; + /** The URL where this list can be accessed. */ + readonly url: string; + } | null; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "file"; /** 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`. */ @@ -3438,7 +3337,7 @@ export interface components { readonly type?: string | null; /** The URL from which the file can be downloaded using your live secret API key. */ readonly url?: string | null; - } & { readonly [key: string]: any }; + }; /** * 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 @@ -3452,7 +3351,7 @@ export interface components { /** Time at which the link expires. */ readonly expires_at?: number | null; /** The file object this link points to. */ - readonly file: (Partial & Partial) & { readonly [key: string]: any }; + readonly file: Partial & Partial; /** Unique identifier for the object. */ readonly id: string; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -3463,7 +3362,7 @@ export interface components { readonly object: "file_link"; /** The publicly accessible URL to download the file. */ readonly url?: string | null; - } & { readonly [key: string]: any }; + }; readonly financial_reporting_finance_report_run_run_parameters: { /** The set of output columns requested for inclusion in the report run. */ readonly columns?: readonly string[]; @@ -3481,7 +3380,7 @@ export interface components { readonly reporting_category?: string; /** 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`. */ readonly timezone?: string; - } & { readonly [key: string]: any }; + }; readonly inventory: { /** The count of inventory available. Will be present if and only if `type` is `finite`. */ readonly quantity?: number | null; @@ -3489,7 +3388,7 @@ export interface components { readonly type: string; /** 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`. */ readonly value?: string | null; - } & { readonly [key: string]: any }; + }; /** * Invoices are statements of amounts owed by a customer, and are either * generated one-off, or generated periodically from a subscription. @@ -3557,9 +3456,7 @@ export interface components { ) | null; /** ID of the latest charge generated for this invoice, if any. */ - readonly charge?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly charge?: (Partial & Partial) | null; /** 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. */ readonly collection_method?: ("charge_automatically" | "send_invoice") | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ @@ -3569,11 +3466,11 @@ export interface components { /** Custom fields displayed on the invoice. */ readonly custom_fields?: readonly components["schemas"]["invoice_setting_custom_field"][] | null; /** The ID of the customer who will be billed. */ - readonly customer: (Partial & + readonly customer: Partial & Partial & - Partial) & { readonly [key: string]: any }; + Partial; /** 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. */ - readonly customer_address?: (Partial & { readonly [key: string]: any }) | null; + readonly customer_address?: Partial | null; /** 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. */ readonly customer_email?: string | null; /** 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. */ @@ -3581,32 +3478,28 @@ export interface components { /** 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. */ readonly customer_phone?: string | null; /** 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. */ - readonly customer_shipping?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly customer_shipping?: Partial | null; /** 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. */ readonly customer_tax_exempt?: ("exempt" | "none" | "reverse") | null; /** 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. */ readonly customer_tax_ids?: readonly components["schemas"]["invoices_resource_invoice_tax_id"][] | null; /** 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. */ - readonly default_payment_method?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly default_payment_method?: (Partial & Partial) | null; /** 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. */ readonly default_source?: - | ((Partial & + | (Partial & Partial & Partial & Partial & Partial & - Partial) & { readonly [key: string]: any }) + Partial) | null; /** The tax rates applied to this invoice, if any. */ readonly default_tax_rates?: readonly components["schemas"]["tax_rate"][] | null; /** An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ readonly description?: string | null; /** Describes the current discount applied to this invoice, if there is one. */ - readonly discount?: (Partial & { readonly [key: string]: any }) | null; + readonly discount?: Partial | null; /** The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. */ readonly due_date?: number | null; /** 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. */ @@ -3629,7 +3522,7 @@ export interface components { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ readonly livemode: boolean; /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -3643,9 +3536,7 @@ export interface components { /** 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. */ readonly paid: boolean; /** 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. */ - readonly payment_intent?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly payment_intent?: (Partial & Partial) | null; /** End of the usage period during which invoice items were added to this invoice. */ readonly period_end: number; /** Start of the usage period during which invoice items were added to this invoice. */ @@ -3664,9 +3555,7 @@ export interface components { readonly status?: ("deleted" | "draft" | "open" | "paid" | "uncollectible" | "void") | null; readonly status_transitions: components["schemas"]["invoices_status_transitions"]; /** The subscription that this invoice was prepared for, if any. */ - readonly subscription?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly subscription?: (Partial & Partial) | null; /** Only set for upcoming invoices that preview prorations. The time used to calculate prorations. */ readonly subscription_proration_date?: number; /** Total of all subscriptions, invoice items, and prorations on the invoice before any discount or tax is applied. */ @@ -3682,55 +3571,51 @@ export interface components { readonly total_tax_amounts?: readonly components["schemas"]["invoice_tax_amount"][] | null; /** 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. */ readonly webhooks_delivered_at?: number | null; - } & { readonly [key: string]: any }; + }; readonly invoice_item_threshold_reason: { /** The IDs of the line items that triggered the threshold invoice. */ readonly line_item_ids: readonly string[]; /** The quantity threshold boundary that applied to the given line item. */ readonly usage_gte: number; - } & { readonly [key: string]: any }; + }; readonly invoice_line_item_period: { /** End of the line item's billing period */ readonly end: number; /** Start of the line item's billing period */ readonly start: number; - } & { readonly [key: string]: any }; + }; readonly invoice_setting_custom_field: { /** The name of the custom field. */ readonly name: string; /** The value of the custom field. */ readonly value: string; - } & { readonly [key: string]: any }; + }; readonly invoice_setting_customer_setting: { /** Default custom fields to be displayed on invoices for this customer. */ readonly custom_fields?: readonly components["schemas"]["invoice_setting_custom_field"][] | null; /** 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. */ - readonly default_payment_method?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly default_payment_method?: (Partial & Partial) | null; /** Default footer to be displayed on invoices for this customer. */ readonly footer?: string | null; - } & { readonly [key: string]: any }; + }; readonly invoice_setting_subscription_schedule_setting: { /** 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`. */ readonly days_until_due?: number | null; - } & { readonly [key: string]: any }; + }; readonly invoice_tax_amount: { /** The amount, in %s, of the tax. */ readonly amount: number; /** Whether this tax amount is inclusive or exclusive. */ readonly inclusive: boolean; /** The tax rate that was applied to get this tax amount. */ - readonly tax_rate: (Partial & Partial) & { - readonly [key: string]: any; - }; - } & { readonly [key: string]: any }; + readonly tax_rate: Partial & Partial; + }; readonly invoice_threshold_reason: { /** The total invoice amount threshold boundary if it triggered the threshold invoice. */ readonly amount_gte?: number | null; /** Indicates which line items triggered a threshold invoice. */ readonly item_reasons: readonly components["schemas"]["invoice_item_threshold_reason"][]; - } & { readonly [key: string]: any }; + }; /** * 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 @@ -3746,9 +3631,9 @@ export interface components { /** 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). */ readonly currency: string; /** The ID of the customer who will be billed when this invoice item is billed. */ - readonly customer: (Partial & + readonly customer: Partial & Partial & - Partial) & { readonly [key: string]: any }; + Partial; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly date: number; /** An arbitrary string attached to the object. Often useful for displaying to users. */ @@ -3758,9 +3643,7 @@ export interface components { /** Unique identifier for the object. */ readonly id: string; /** The ID of the invoice this invoice item belongs to. */ - readonly invoice?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly invoice?: (Partial & Partial) | null; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ readonly livemode: boolean; /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -3769,15 +3652,13 @@ export interface components { readonly object: "invoiceitem"; readonly period: components["schemas"]["invoice_line_item_period"]; /** If the invoice item is a proration, the plan of the subscription that the proration was computed for. */ - readonly plan?: (Partial & { readonly [key: string]: any }) | null; + readonly plan?: Partial | null; /** Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. */ readonly proration: boolean; /** 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. */ readonly quantity: number; /** The subscription that this invoice item has been created for, if any. */ - readonly subscription?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly subscription?: (Partial & Partial) | null; /** The subscription item that this invoice item has been created for, if any. */ readonly subscription_item?: string; /** 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. */ @@ -3786,7 +3667,7 @@ export interface components { readonly unit_amount?: number | null; /** Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. */ readonly unit_amount_decimal?: string | null; - } & { readonly [key: string]: any }; + }; readonly invoices_resource_invoice_tax_id: { /** 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` */ readonly type: @@ -3816,7 +3697,7 @@ export interface components { | "za_vat"; /** The value of the tax ID. */ readonly value?: string | null; - } & { readonly [key: string]: any }; + }; readonly invoices_status_transitions: { /** The time that the invoice draft was finalized. */ readonly finalized_at?: number | null; @@ -3826,7 +3707,7 @@ export interface components { readonly paid_at?: number | null; /** The time that the invoice was voided. */ readonly voided_at?: number | null; - } & { readonly [key: string]: any }; + }; /** * This resource has been renamed to [Early Fraud * Warning](#early_fraud_warning_object) and will be removed in a future API @@ -3836,7 +3717,7 @@ export interface components { /** 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. */ readonly actionable: boolean; /** ID of the charge this issuer fraud record is for, optionally expanded. */ - readonly charge: (Partial & Partial) & { readonly [key: string]: any }; + readonly charge: Partial & Partial; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number; /** 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`. */ @@ -3851,7 +3732,7 @@ export interface components { readonly object: "issuer_fraud_record"; /** The timestamp at which the card issuer posted the issuer fraud record. */ readonly post_date: number; - } & { readonly [key: string]: any }; + }; /** * 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 @@ -3870,9 +3751,7 @@ export interface components { readonly balance_transactions: readonly components["schemas"]["balance_transaction"][]; readonly card: components["schemas"]["issuing.card"]; /** The cardholder to whom this authorization belongs. */ - readonly cardholder?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly cardholder?: (Partial & Partial) | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number; /** 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). */ @@ -3891,9 +3770,7 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "issuing.authorization"; /** The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook. */ - readonly pending_request?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly pending_request?: Partial | null; /** 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. */ readonly request_history: readonly components["schemas"]["issuing_authorization_request"][]; /** The current status of the authorization in its lifecycle. */ @@ -3903,7 +3780,7 @@ export interface components { readonly verification_data: components["schemas"]["issuing_authorization_verification_data"]; /** What, if any, digital wallet was used for this authorization. One of `apple_pay`, `google_pay`, or `samsung_pay`. */ readonly wallet?: string | null; - } & { readonly [key: string]: any }; + }; /** You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) that are issued to cardholders. */ readonly "issuing.card": { /** The brand of the card. */ @@ -3934,25 +3811,19 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "issuing.card"; /** The latest card that replaces this card, if any. */ - readonly replaced_by?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly replaced_by?: (Partial & Partial) | null; /** The card this card replaces, if any. */ - readonly replacement_for?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly replacement_for?: (Partial & Partial) | null; /** The reason why the previous card needed to be replaced. */ readonly replacement_reason?: ("damaged" | "expired" | "lost" | "stolen") | null; /** Where and how the card will be shipped. */ - readonly shipping?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly shipping?: Partial | null; readonly spending_controls: components["schemas"]["issuing_card_authorization_controls"]; /** Whether authorizations can be approved on this card. */ readonly status: "active" | "canceled" | "inactive"; /** The type of the card. */ readonly type: "physical" | "virtual"; - } & { readonly [key: string]: any }; + }; /** * An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. * @@ -3961,9 +3832,7 @@ export interface components { readonly "issuing.cardholder": { readonly billing: components["schemas"]["issuing_cardholder_address"]; /** Additional information about a `company` cardholder. */ - readonly company?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly company?: Partial | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number; /** The cardholder's email address. */ @@ -3971,9 +3840,7 @@ export interface components { /** Unique identifier for the object. */ readonly id: string; /** Additional information about an `individual` cardholder. */ - readonly individual?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly individual?: Partial | null; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ readonly livemode: boolean; /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -3986,16 +3853,12 @@ export interface components { readonly phone_number?: string | null; readonly requirements: components["schemas"]["issuing_cardholder_requirements"]; /** Spending rules that give you some control over how this cardholder's cards can be used. Refer to our [authorizations](https://stripe.com/docs/issuing/purchases/authorizations) documentation for more details. */ - readonly spending_controls?: - | (Partial & { - readonly [key: string]: any; - }) - | null; + readonly spending_controls?: Partial | null; /** Specifies whether to permit authorizations on this cardholder's cards. */ readonly status: "active" | "blocked" | "inactive"; /** One of `individual` or `company`. */ readonly type: "company" | "individual"; - } & { readonly [key: string]: any }; + }; /** * 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. * @@ -4008,7 +3871,7 @@ export interface components { readonly livemode: boolean; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "issuing.dispute"; - } & { readonly [key: string]: any }; + }; /** 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. */ readonly "issuing.settlement": { /** The Bank Identification Number reflecting this settlement record. */ @@ -4043,7 +3906,7 @@ export interface components { readonly transaction_count: number; /** The total transaction amount reflected in this settlement. */ readonly transaction_volume: number; - } & { readonly [key: string]: any }; + }; /** * 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 @@ -4055,23 +3918,13 @@ export interface components { /** 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). */ readonly amount: number; /** The `Authorization` object that led to this transaction. */ - readonly authorization?: - | ((Partial & Partial) & { - readonly [key: string]: any; - }) - | null; + readonly authorization?: (Partial & Partial) | null; /** ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction. */ - readonly balance_transaction?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly balance_transaction?: (Partial & Partial) | null; /** The card used to make this transaction. */ - readonly card: (Partial & Partial) & { - readonly [key: string]: any; - }; + readonly card: Partial & Partial; /** The cardholder to whom this transaction belongs. */ - readonly cardholder?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly cardholder?: (Partial & Partial) | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number; /** 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). */ @@ -4091,7 +3944,7 @@ export interface components { readonly object: "issuing.transaction"; /** The nature of the transaction. */ readonly type: "capture" | "refund"; - } & { readonly [key: string]: any }; + }; readonly issuing_authorization_merchant_data: { /** 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. */ readonly category: string; @@ -4107,7 +3960,7 @@ export interface components { readonly postal_code?: string | null; /** State where the seller is located */ readonly state?: string | null; - } & { readonly [key: string]: any }; + }; readonly issuing_authorization_pending_request: { /** 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). */ readonly amount: number; @@ -4119,7 +3972,7 @@ export interface components { readonly merchant_amount: number; /** The local currency the merchant is requesting to authorize. */ readonly merchant_currency: string; - } & { readonly [key: string]: any }; + }; readonly issuing_authorization_request: { /** 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. */ readonly amount: number; @@ -4148,7 +4001,7 @@ export interface components { | "webhook_approved" | "webhook_declined" | "webhook_timeout"; - } & { readonly [key: string]: any }; + }; readonly issuing_authorization_verification_data: { /** Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. */ readonly address_line1_check: "match" | "mismatch" | "not_provided"; @@ -4158,7 +4011,7 @@ export interface components { readonly cvc_check: "match" | "mismatch" | "not_provided"; /** Whether the cardholder provided an expiry date and if it matched Stripe’s record. */ readonly expiry_check: "match" | "mismatch" | "not_provided"; - } & { readonly [key: string]: any }; + }; readonly issuing_card_authorization_controls: { /** Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations permitted on this card. */ readonly allowed_categories?: @@ -4750,7 +4603,7 @@ export interface components { readonly spending_limits?: readonly components["schemas"]["issuing_card_spending_limit"][] | null; /** Currency for the amounts within spending_limits. Locked to the currency of the card. */ readonly spending_limits_currency?: string | null; - } & { readonly [key: string]: any }; + }; readonly issuing_card_shipping: { readonly address: components["schemas"]["address"]; /** The delivery company that shipped a card. */ @@ -4769,7 +4622,7 @@ export interface components { readonly tracking_url?: string | null; /** Packaging options. */ readonly type: "bulk" | "individual"; - } & { readonly [key: string]: any }; + }; readonly issuing_card_spending_limit: { /** Maximum amount allowed to spend per time interval. */ readonly amount: number; @@ -5068,10 +4921,10 @@ export interface components { | null; /** The time interval or event with which to apply this spending limit towards. */ readonly interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; - } & { readonly [key: string]: any }; + }; readonly issuing_cardholder_address: { readonly address: components["schemas"]["address"]; - } & { readonly [key: string]: any }; + }; readonly issuing_cardholder_authorization_controls: { /** Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations permitted on this cardholder's cards. */ readonly allowed_categories?: @@ -5663,35 +5516,27 @@ export interface components { readonly spending_limits?: readonly components["schemas"]["issuing_cardholder_spending_limit"][] | null; /** Currency for the amounts within spending_limits. */ readonly spending_limits_currency?: string | null; - } & { readonly [key: string]: any }; + }; readonly issuing_cardholder_company: { /** Whether the company's business ID number was provided. */ readonly tax_id_provided: boolean; - } & { readonly [key: string]: any }; + }; readonly issuing_cardholder_id_document: { /** The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. */ - readonly back?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly back?: (Partial & Partial) | null; /** The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. */ - readonly front?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; - } & { readonly [key: string]: any }; + readonly front?: (Partial & Partial) | null; + }; readonly issuing_cardholder_individual: { /** The date of birth of this cardholder. */ - readonly dob?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly dob?: Partial | null; /** The first name of this cardholder. */ readonly first_name: string; /** The last name of this cardholder. */ readonly last_name: string; /** Government-issued ID document for this cardholder. */ - readonly verification?: - | (Partial & { readonly [key: string]: any }) - | null; - } & { readonly [key: string]: any }; + readonly verification?: Partial | null; + }; readonly issuing_cardholder_individual_dob: { /** The day of birth, between 1 and 31. */ readonly day?: number | null; @@ -5699,7 +5544,7 @@ export interface components { readonly month?: number | null; /** The four-digit year of birth. */ readonly year?: number | null; - } & { readonly [key: string]: any }; + }; readonly issuing_cardholder_requirements: { /** If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason. */ readonly disabled_reason?: ("listed" | "rejected.listed" | "under_review") | null; @@ -5715,7 +5560,7 @@ export interface components { | "individual.verification.document" )[] | null; - } & { readonly [key: string]: any }; + }; readonly issuing_cardholder_spending_limit: { /** Maximum amount allowed to spend per time interval. */ readonly amount: number; @@ -6014,23 +5859,17 @@ export interface components { | null; /** The time interval or event with which to apply this spending limit towards. */ readonly interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; - } & { readonly [key: string]: any }; + }; readonly issuing_cardholder_verification: { /** An identifying document, either a passport or local ID card. */ - readonly document?: - | (Partial & { readonly [key: string]: any }) - | null; - } & { readonly [key: string]: any }; + readonly document?: Partial | null; + }; readonly legal_entity_company: { readonly address?: components["schemas"]["address"]; /** The Kana variation of the company's primary address (Japan only). */ - readonly address_kana?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly address_kana?: Partial | null; /** The Kanji variation of the company's primary address (Japan only). */ - readonly address_kanji?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly address_kanji?: Partial | null; /** 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). */ readonly directors_provided?: boolean; /** 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. */ @@ -6069,27 +5908,21 @@ export interface components { /** Whether the company's business VAT number was provided. */ readonly vat_id_provided?: boolean; /** Information on the verification state of the company. */ - readonly verification?: - | (Partial & { readonly [key: string]: any }) - | null; - } & { readonly [key: string]: any }; + readonly verification?: Partial | null; + }; readonly legal_entity_company_verification: { readonly document: components["schemas"]["legal_entity_company_verification_document"]; - } & { readonly [key: string]: any }; + }; readonly legal_entity_company_verification_document: { /** The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. */ - readonly back?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly back?: (Partial & Partial) | null; /** A user-displayable string describing the verification state of this document. */ readonly details?: string | null; /** 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. */ readonly details_code?: string | null; /** The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. */ - readonly front?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; - } & { readonly [key: string]: any }; + readonly front?: (Partial & Partial) | null; + }; readonly legal_entity_dob: { /** The day of birth, between 1 and 31. */ readonly day?: number | null; @@ -6097,7 +5930,7 @@ export interface components { readonly month?: number | null; /** The four-digit year of birth. */ readonly year?: number | null; - } & { readonly [key: string]: any }; + }; readonly legal_entity_japan_address: { /** City/Ward. */ readonly city?: string | null; @@ -6113,14 +5946,10 @@ export interface components { readonly state?: string | null; /** Town/cho-me. */ readonly town?: string | null; - } & { readonly [key: string]: any }; + }; readonly legal_entity_person_verification: { /** A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. */ - readonly additional_document?: - | (Partial & { - readonly [key: string]: any; - }) - | null; + readonly additional_document?: Partial | null; /** A user-displayable string describing the verification state for the person. For example, this may say "Provided identity information could not be verified". */ readonly details?: string | null; /** 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. */ @@ -6128,21 +5957,17 @@ export interface components { readonly document?: components["schemas"]["legal_entity_person_verification_document"]; /** The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`. */ readonly status: string; - } & { readonly [key: string]: any }; + }; readonly legal_entity_person_verification_document: { /** The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. */ - readonly back?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly back?: (Partial & Partial) | null; /** 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". */ readonly details?: string | null; /** 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. */ readonly details_code?: string | null; /** The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. */ - readonly front?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; - } & { readonly [key: string]: any }; + readonly front?: (Partial & Partial) | null; + }; readonly light_account_logout: { readonly [key: string]: any }; readonly line_item: { /** The amount, in %s. */ @@ -6165,7 +5990,7 @@ export interface components { readonly object: "line_item"; readonly period: components["schemas"]["invoice_line_item_period"]; /** The plan of the subscription, if the line item is a subscription or a proration. */ - readonly plan?: (Partial & { readonly [key: string]: any }) | null; + readonly plan?: Partial | null; /** Whether this is a proration. */ readonly proration: boolean; /** The quantity of the subscription, if the line item is a subscription or a proration. */ @@ -6180,7 +6005,7 @@ export interface components { readonly tax_rates?: readonly components["schemas"]["tax_rate"][] | null; /** A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`. */ readonly type: "invoiceitem" | "subscription"; - } & { readonly [key: string]: any }; + }; readonly login_link: { /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number; @@ -6188,7 +6013,7 @@ export interface components { readonly object: "login_link"; /** The URL for the login link. */ readonly url: string; - } & { readonly [key: string]: any }; + }; /** A Mandate is a record of the permission a customer has given you to debit their payment method. */ readonly mandate: { readonly customer_acceptance: components["schemas"]["customer_acceptance"]; @@ -6200,20 +6025,18 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "mandate"; /** ID of the payment method associated with this mandate. */ - readonly payment_method: (Partial & Partial) & { - readonly [key: string]: any; - }; + readonly payment_method: Partial & Partial; readonly payment_method_details: components["schemas"]["mandate_payment_method_details"]; readonly single_use?: components["schemas"]["mandate_single_use"]; /** The status of the mandate, which indicates whether it can be used to initiate a payment. */ readonly status: "active" | "inactive" | "pending"; /** The type of the mandate. */ readonly type: "multi_use" | "single_use"; - } & { readonly [key: string]: any }; + }; readonly mandate_au_becs_debit: { /** The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. */ readonly url: string; - } & { readonly [key: string]: any }; + }; readonly mandate_multi_use: { readonly [key: string]: any }; readonly mandate_payment_method_details: { readonly au_becs_debit?: components["schemas"]["mandate_au_becs_debit"]; @@ -6221,38 +6044,38 @@ export interface components { readonly sepa_debit?: components["schemas"]["mandate_sepa_debit"]; /** 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. */ readonly type: string; - } & { readonly [key: string]: any }; + }; readonly mandate_sepa_debit: { /** The unique reference of the mandate. */ readonly reference: string; /** The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. */ readonly url: string; - } & { readonly [key: string]: any }; + }; readonly mandate_single_use: { /** On a single use mandate, the amount of the payment. */ readonly amount: number; /** On a single use mandate, the currency of the payment. */ readonly currency: string; - } & { readonly [key: string]: any }; + }; readonly notification_event_data: { /** 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. */ readonly object: { readonly [key: string]: any }; /** Object containing the names of the attributes that have changed, and their previous values (sent along only with *.updated events). */ readonly previous_attributes?: { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; readonly notification_event_request: { /** 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. */ readonly id?: string | null; /** The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. */ readonly idempotency_key?: string | null; - } & { readonly [key: string]: any }; + }; readonly offline_acceptance: { readonly [key: string]: any }; readonly online_acceptance: { /** The IP address from which the Mandate was accepted by the customer. */ readonly ip_address?: string | null; /** The user agent of the browser from which the Mandate was accepted by the customer. */ readonly user_agent?: string | null; - } & { readonly [key: string]: any }; + }; /** * 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 @@ -6270,18 +6093,16 @@ export interface components { /** 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. */ readonly application_fee?: number | null; /** The ID of the payment used to pay for the order. Present if the order status is `paid`, `fulfilled`, or `refunded`. */ - readonly charge?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly charge?: (Partial & Partial) | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number; /** 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). */ readonly currency: string; /** The customer used for the order. */ readonly customer?: - | ((Partial & + | (Partial & Partial & - Partial) & { readonly [key: string]: any }) + Partial) | null; /** The email address of the customer placing the order. */ readonly email?: string | null; @@ -6298,35 +6119,31 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "order"; /** A list of returns that have taken place for this order. */ - readonly returns?: - | ({ - /** Details about each object. */ - readonly data: readonly components["schemas"]["order_return"][]; - /** True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - readonly object: "list"; - /** The URL where this list can be accessed. */ - readonly url: string; - } & { readonly [key: string]: any }) - | null; + readonly returns?: { + /** Details about each object. */ + readonly data: readonly components["schemas"]["order_return"][]; + /** True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + readonly object: "list"; + /** The URL where this list can be accessed. */ + readonly url: string; + } | null; /** 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. */ readonly selected_shipping_method?: string | null; /** The shipping address for the order. Present if the order is for goods to be shipped. */ - readonly shipping?: (Partial & { readonly [key: string]: any }) | null; + readonly shipping?: Partial | null; /** 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. */ readonly shipping_methods?: readonly components["schemas"]["shipping_method"][] | null; /** 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). */ readonly status: string; /** The timestamps at which the order status was updated. */ - readonly status_transitions?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly status_transitions?: Partial | null; /** Time at which the object was last updated. Measured in seconds since the Unix epoch. */ readonly updated?: number | null; /** The user's order ID if it is different from the Stripe order ID. */ readonly upstream_id?: string; - } & { readonly [key: string]: any }; + }; /** * 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. @@ -6343,14 +6160,12 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "order_item"; /** The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). */ - readonly parent?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly parent?: (Partial & Partial) | null; /** A positive integer representing the number of instances of `parent` that are included in this order item. Applicable/present only if `type` is `sku`. */ readonly quantity?: number | null; /** The type of line item. One of `sku`, `tax`, `shipping`, or `discount`. */ readonly type: string; - } & { readonly [key: string]: any }; + }; /** * 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. @@ -6373,14 +6188,10 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "order_return"; /** The order that this return includes items from. */ - readonly order?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly order?: (Partial & Partial) | null; /** The ID of the refund issued for this return. */ - readonly refund?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; - } & { readonly [key: string]: any }; + readonly refund?: (Partial & Partial) | null; + }; readonly package_dimensions: { /** Height, in inches. */ readonly height: number; @@ -6390,7 +6201,7 @@ export interface components { readonly weight: number; /** Width, in inches. */ readonly width: number; - } & { readonly [key: string]: any }; + }; /** * 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 @@ -6412,9 +6223,7 @@ export interface components { /** Amount that was collected by this PaymentIntent. */ readonly amount_received?: number; /** ID of the Connect application that created the PaymentIntent. */ - readonly application?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly application?: (Partial & Partial) | null; /** 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. */ readonly application_fee_amount?: number | null; /** Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. */ @@ -6443,7 +6252,7 @@ export interface components { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; /** * The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. * @@ -6465,52 +6274,38 @@ export interface components { * 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. */ readonly customer?: - | ((Partial & + | (Partial & Partial & - Partial) & { readonly [key: string]: any }) + Partial) | null; /** An arbitrary string attached to the object. Often useful for displaying to users. */ readonly description?: string | null; /** Unique identifier for the object. */ readonly id: string; /** ID of the invoice that created this PaymentIntent, if it exists. */ - readonly invoice?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly invoice?: (Partial & Partial) | null; /** The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. */ - readonly last_payment_error?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly last_payment_error?: Partial | null; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ readonly livemode: boolean; /** Set of key-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). */ readonly metadata?: { readonly [key: string]: string }; /** 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. */ - readonly next_action?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly next_action?: Partial | null; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "payment_intent"; /** 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. */ - readonly on_behalf_of?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly on_behalf_of?: (Partial & Partial) | null; /** ID of the payment method used in this PaymentIntent. */ - readonly payment_method?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly payment_method?: (Partial & Partial) | null; /** Payment-method-specific configuration for this PaymentIntent. */ - readonly payment_method_options?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly payment_method_options?: Partial | null; /** The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ readonly payment_method_types: readonly string[]; /** Email address that the receipt for the resulting payment will be sent to. */ readonly receipt_email?: string | null; /** ID of the review associated with this PaymentIntent, if any. */ - readonly review?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly review?: (Partial & Partial) | null; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -6520,7 +6315,7 @@ export interface components { */ readonly setup_future_usage?: ("off_session" | "on_session") | null; /** Shipping information for this PaymentIntent. */ - readonly shipping?: (Partial & { readonly [key: string]: any }) | null; + readonly shipping?: Partial | null; /** 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. */ readonly statement_descriptor?: string | null; /** 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. */ @@ -6535,40 +6330,36 @@ export interface components { | "requires_payment_method" | "succeeded"; /** 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. */ - readonly transfer_data?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly transfer_data?: Partial | null; /** 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. */ readonly transfer_group?: string | null; - } & { readonly [key: string]: any }; + }; readonly payment_intent_next_action: { readonly redirect_to_url?: components["schemas"]["payment_intent_next_action_redirect_to_url"]; /** Type of the next action to perform, one of `redirect_to_url` or `use_stripe_sdk`. */ readonly type: string; /** 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. */ readonly use_stripe_sdk?: { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; readonly payment_intent_next_action_redirect_to_url: { /** If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ readonly return_url?: string | null; /** The URL you must redirect your customer to in order to authenticate the payment. */ readonly url?: string | null; - } & { readonly [key: string]: any }; + }; readonly payment_intent_payment_method_options: { readonly card?: components["schemas"]["payment_intent_payment_method_options_card"]; - } & { readonly [key: string]: any }; + }; readonly payment_intent_payment_method_options_card: { /** * Installment details for this payment (Mexico only). * * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). */ - readonly installments?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly installments?: Partial | null; /** 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. */ readonly request_three_d_secure?: ("any" | "automatic" | "challenge_only") | null; - } & { readonly [key: string]: any }; + }; /** * 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 @@ -6584,9 +6375,7 @@ export interface components { /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number; /** 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. */ - readonly customer?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly customer?: (Partial & Partial) | null; readonly fpx?: components["schemas"]["payment_method_fpx"]; /** Unique identifier for the object. */ readonly id: string; @@ -6600,7 +6389,7 @@ export interface components { readonly sepa_debit?: components["schemas"]["payment_method_sepa_debit"]; /** 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. */ readonly type: "au_becs_debit" | "card" | "fpx" | "ideal" | "sepa_debit"; - } & { readonly [key: string]: any }; + }; readonly payment_method_au_becs_debit: { /** Six-digit number identifying bank and branch associated with this bank account. */ readonly bsb_number?: string | null; @@ -6608,14 +6397,12 @@ export interface components { readonly fingerprint?: string | null; /** Last four digits of the bank account number. */ readonly last4?: string | null; - } & { readonly [key: string]: any }; + }; readonly payment_method_card: { /** Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ readonly brand: string; /** Checks on Card address and CVC if provided. */ - readonly checks?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly checks?: Partial | null; /** 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. */ readonly country?: string | null; /** Two-digit number representing the card's expiration month. */ @@ -6627,20 +6414,14 @@ export interface components { /** Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ readonly funding: string; /** Details of the original PaymentMethod that created this object. */ - readonly generated_from?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly generated_from?: Partial | null; /** The last four digits of the card. */ readonly last4: string; /** Contains details on how this Card maybe be used for 3D Secure authentication. */ - readonly three_d_secure_usage?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly three_d_secure_usage?: Partial | null; /** If this Card is part of a card wallet, this contains the details of the card wallet. */ - readonly wallet?: - | (Partial & { readonly [key: string]: any }) - | null; - } & { readonly [key: string]: any }; + readonly wallet?: Partial | null; + }; readonly payment_method_card_checks: { /** If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ readonly address_line1_check?: string | null; @@ -6648,15 +6429,13 @@ export interface components { readonly address_postal_code_check?: string | null; /** If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ readonly cvc_check?: string | null; - } & { readonly [key: string]: any }; + }; readonly payment_method_card_generated_card: { /** The charge that created this object. */ readonly charge?: string | null; /** Transaction-specific details of the payment method used in the payment. */ - readonly payment_method_details?: - | (Partial & { readonly [key: string]: any }) - | null; - } & { readonly [key: string]: any }; + readonly payment_method_details?: Partial | null; + }; readonly payment_method_card_present: { readonly [key: string]: any }; readonly payment_method_card_wallet: { readonly amex_express_checkout?: components["schemas"]["payment_method_card_wallet_amex_express_checkout"]; @@ -6675,31 +6454,31 @@ export interface components { | "samsung_pay" | "visa_checkout"; readonly visa_checkout?: components["schemas"]["payment_method_card_wallet_visa_checkout"]; - } & { readonly [key: string]: any }; + }; readonly payment_method_card_wallet_amex_express_checkout: { readonly [key: string]: any }; readonly payment_method_card_wallet_apple_pay: { readonly [key: string]: any }; readonly payment_method_card_wallet_google_pay: { readonly [key: string]: any }; readonly payment_method_card_wallet_masterpass: { /** 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. */ - readonly billing_address?: (Partial & { readonly [key: string]: any }) | null; + readonly billing_address?: Partial | null; /** 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. */ readonly email?: string | null; /** 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. */ readonly name?: string | null; /** 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. */ - readonly shipping_address?: (Partial & { readonly [key: string]: any }) | null; - } & { readonly [key: string]: any }; + readonly shipping_address?: Partial | null; + }; readonly payment_method_card_wallet_samsung_pay: { readonly [key: string]: any }; readonly payment_method_card_wallet_visa_checkout: { /** 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. */ - readonly billing_address?: (Partial & { readonly [key: string]: any }) | null; + readonly billing_address?: Partial | null; /** 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. */ readonly email?: string | null; /** 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. */ readonly name?: string | null; /** 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. */ - readonly shipping_address?: (Partial & { readonly [key: string]: any }) | null; - } & { readonly [key: string]: any }; + readonly shipping_address?: Partial | null; + }; readonly payment_method_details: { readonly ach_credit_transfer?: components["schemas"]["payment_method_details_ach_credit_transfer"]; readonly ach_debit?: components["schemas"]["payment_method_details_ach_debit"]; @@ -6725,7 +6504,7 @@ export interface components { */ readonly type: string; readonly wechat?: components["schemas"]["payment_method_details_wechat"]; - } & { readonly [key: string]: any }; + }; readonly payment_method_details_ach_credit_transfer: { /** Account number to transfer funds to. */ readonly account_number?: string | null; @@ -6735,7 +6514,7 @@ export interface components { readonly routing_number?: string | null; /** SWIFT code of the bank associated with the routing number. */ readonly swift_code?: string | null; - } & { readonly [key: string]: any }; + }; readonly payment_method_details_ach_debit: { /** Type of entity that holds the account. This can be either `individual` or `company`. */ readonly account_holder_type?: ("company" | "individual") | null; @@ -6749,7 +6528,7 @@ export interface components { readonly last4?: string | null; /** Routing transit number of the bank account. */ readonly routing_number?: string | null; - } & { readonly [key: string]: any }; + }; readonly payment_method_details_alipay: { readonly [key: string]: any }; readonly payment_method_details_au_becs_debit: { /** Bank-State-Branch number of the bank account. */ @@ -6760,7 +6539,7 @@ export interface components { readonly last4?: string | null; /** ID of the mandate used to make this payment. */ readonly mandate?: string; - } & { readonly [key: string]: any }; + }; readonly payment_method_details_bancontact: { /** Bank code of bank associated with the bank account. */ readonly bank_code?: string | null; @@ -6780,14 +6559,12 @@ export interface components { * (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ readonly verified_name?: string | null; - } & { readonly [key: string]: any }; + }; readonly payment_method_details_card: { /** Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ readonly brand?: string | null; /** Check results by Card networks on Card address and CVC at time of payment. */ - readonly checks?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly checks?: Partial | null; /** 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. */ readonly country?: string | null; /** Two-digit number representing the card's expiration month. */ @@ -6803,22 +6580,16 @@ export interface components { * * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). */ - readonly installments?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly installments?: Partial | null; /** The last four digits of the card. */ readonly last4?: string | null; /** Identifies which network this charge was processed on. Can be `amex`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ readonly network?: string | null; /** Populated if this transaction used 3D Secure authentication. */ - readonly three_d_secure?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly three_d_secure?: Partial | null; /** If this Card is part of a card wallet, this contains the details of the card wallet. */ - readonly wallet?: - | (Partial & { readonly [key: string]: any }) - | null; - } & { readonly [key: string]: any }; + readonly wallet?: Partial | null; + }; readonly payment_method_details_card_checks: { /** If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ readonly address_line1_check?: string | null; @@ -6826,15 +6597,11 @@ export interface components { readonly address_postal_code_check?: string | null; /** If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ readonly cvc_check?: string | null; - } & { readonly [key: string]: any }; + }; readonly payment_method_details_card_installments: { /** Installment plan selected for the payment. */ - readonly plan?: - | (Partial & { - readonly [key: string]: any; - }) - | null; - } & { readonly [key: string]: any }; + readonly plan?: Partial | null; + }; readonly payment_method_details_card_installments_plan: { /** For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. */ readonly count?: number | null; @@ -6845,7 +6612,7 @@ export interface components { readonly interval?: "month" | null; /** Type of installment plan, one of `fixed_count`. */ readonly type: "fixed_count"; - } & { readonly [key: string]: any }; + }; readonly payment_method_details_card_present: { /** Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ readonly brand?: string | null; @@ -6872,12 +6639,8 @@ export interface components { /** How were card details read in this transaction. Can be contact_emv, contactless_emv, magnetic_stripe_fallback, magnetic_stripe_track2, or contactless_magstripe_mode */ readonly read_method?: string | null; /** A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ - readonly receipt?: - | (Partial & { - readonly [key: string]: any; - }) - | null; - } & { readonly [key: string]: any }; + readonly receipt?: Partial | null; + }; readonly payment_method_details_card_present_receipt: { /** EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ readonly application_cryptogram?: string | null; @@ -6895,7 +6658,7 @@ export interface components { readonly terminal_verification_results?: string | null; /** An indication of various EMV functions performed during the transaction. */ readonly transaction_status_information?: string | null; - } & { readonly [key: string]: any }; + }; readonly payment_method_details_card_wallet: { readonly amex_express_checkout?: components["schemas"]["payment_method_details_card_wallet_amex_express_checkout"]; readonly apple_pay?: components["schemas"]["payment_method_details_card_wallet_apple_pay"]; @@ -6913,38 +6676,38 @@ export interface components { | "samsung_pay" | "visa_checkout"; readonly visa_checkout?: components["schemas"]["payment_method_details_card_wallet_visa_checkout"]; - } & { readonly [key: string]: any }; + }; readonly payment_method_details_card_wallet_amex_express_checkout: { readonly [key: string]: any }; readonly payment_method_details_card_wallet_apple_pay: { readonly [key: string]: any }; readonly payment_method_details_card_wallet_google_pay: { readonly [key: string]: any }; readonly payment_method_details_card_wallet_masterpass: { /** 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. */ - readonly billing_address?: (Partial & { readonly [key: string]: any }) | null; + readonly billing_address?: Partial | null; /** 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. */ readonly email?: string | null; /** 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. */ readonly name?: string | null; /** 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. */ - readonly shipping_address?: (Partial & { readonly [key: string]: any }) | null; - } & { readonly [key: string]: any }; + readonly shipping_address?: Partial | null; + }; readonly payment_method_details_card_wallet_samsung_pay: { readonly [key: string]: any }; readonly payment_method_details_card_wallet_visa_checkout: { /** 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. */ - readonly billing_address?: (Partial & { readonly [key: string]: any }) | null; + readonly billing_address?: Partial | null; /** 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. */ readonly email?: string | null; /** 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. */ readonly name?: string | null; /** 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. */ - readonly shipping_address?: (Partial & { readonly [key: string]: any }) | null; - } & { readonly [key: string]: any }; + readonly shipping_address?: Partial | null; + }; readonly payment_method_details_eps: { /** * 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. */ readonly verified_name?: string | null; - } & { readonly [key: string]: any }; + }; readonly payment_method_details_fpx: { /** 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`. */ readonly bank: @@ -6970,7 +6733,7 @@ export interface components { | "uob"; /** Unique transaction id generated by FPX for every request from the merchant */ readonly transaction_id?: string | null; - } & { readonly [key: string]: any }; + }; readonly payment_method_details_giropay: { /** Bank code of bank associated with the bank account. */ readonly bank_code?: string | null; @@ -6983,7 +6746,7 @@ export interface components { * (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ readonly verified_name?: string | null; - } & { readonly [key: string]: any }; + }; readonly payment_method_details_ideal: { /** 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`. */ readonly bank?: @@ -7026,14 +6789,14 @@ export interface components { * (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ readonly verified_name?: string | null; - } & { readonly [key: string]: any }; + }; readonly payment_method_details_klarna: { readonly [key: string]: any }; readonly payment_method_details_multibanco: { /** Entity number associated with this Multibanco payment. */ readonly entity?: string | null; /** Reference number associated with this Multibanco payment. */ readonly reference?: string | null; - } & { readonly [key: string]: any }; + }; readonly payment_method_details_p24: { /** Unique reference for this Przelewy24 payment. */ readonly reference?: string | null; @@ -7042,7 +6805,7 @@ export interface components { * (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ readonly verified_name?: string | null; - } & { readonly [key: string]: any }; + }; readonly payment_method_details_sepa_debit: { /** Bank code of bank associated with the bank account. */ readonly bank_code?: string | null; @@ -7056,7 +6819,7 @@ export interface components { readonly last4?: string | null; /** ID of the mandate used to make this payment. */ readonly mandate?: string | null; - } & { readonly [key: string]: any }; + }; readonly payment_method_details_sofort: { /** Bank code of bank associated with the bank account. */ readonly bank_code?: string | null; @@ -7073,7 +6836,7 @@ export interface components { * (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ readonly verified_name?: string | null; - } & { readonly [key: string]: any }; + }; readonly payment_method_details_stripe_account: { readonly [key: string]: any }; readonly payment_method_details_wechat: { readonly [key: string]: any }; readonly payment_method_fpx: { @@ -7099,7 +6862,7 @@ export interface components { | "rhb" | "standard_chartered" | "uob"; - } & { readonly [key: string]: any }; + }; readonly payment_method_ideal: { /** 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`. */ readonly bank?: @@ -7135,7 +6898,7 @@ export interface components { | "TRIONL2U" ) | null; - } & { readonly [key: string]: any }; + }; readonly payment_method_options_card_installments: { /** Installment plans that may be selected for this PaymentIntent. */ readonly available_plans?: @@ -7144,12 +6907,8 @@ export interface components { /** Whether Installments are enabled for this PaymentIntent. */ readonly enabled: boolean; /** Installment plan selected for this PaymentIntent. */ - readonly plan?: - | (Partial & { - readonly [key: string]: any; - }) - | null; - } & { readonly [key: string]: any }; + readonly plan?: Partial | null; + }; readonly payment_method_sepa_debit: { /** Bank code of bank associated with the bank account. */ readonly bank_code?: string | null; @@ -7161,7 +6920,7 @@ export interface components { readonly fingerprint?: string | null; /** Last four characters of the IBAN. */ readonly last4?: string | null; - } & { readonly [key: string]: any }; + }; readonly payment_pages_payment_page_resources_shipping_address_collection: { /** * An array of two-letter ISO country codes representing which countries Checkout should provide as options for @@ -7406,13 +7165,13 @@ export interface components { | "ZW" | "ZZ" )[]; - } & { readonly [key: string]: any }; - readonly payment_source: (Partial & + }; + readonly payment_source: Partial & Partial & Partial & Partial & Partial & - Partial) & { readonly [key: string]: any }; + Partial; /** * 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 @@ -7431,9 +7190,7 @@ export interface components { /** 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). */ readonly automatic: boolean; /** ID of the balance transaction that describes the impact of this payout on your account balance. */ - readonly balance_transaction?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly balance_transaction?: (Partial & Partial) | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number; /** 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). */ @@ -7442,15 +7199,15 @@ export interface components { readonly description?: string | null; /** ID of the bank account or card the payout was sent to. */ readonly destination?: - | ((Partial & + | (Partial & Partial & Partial & Partial & - Partial) & { readonly [key: string]: any }) + Partial) | null; /** 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. */ readonly failure_balance_transaction?: - | ((Partial & Partial) & { readonly [key: string]: any }) + | (Partial & Partial) | null; /** 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. */ readonly failure_code?: string | null; @@ -7474,13 +7231,13 @@ export interface components { readonly status: string; /** Can be `bank_account` or `card`. */ readonly type: "bank_account" | "card"; - } & { readonly [key: string]: any }; + }; readonly period: { /** The end date of this usage period. All usage up to and including this point in time is included. */ readonly end?: number | null; /** The start date of this usage period. All usage after this point in time is included. */ readonly start?: number | null; - } & { readonly [key: string]: any }; + }; /** * This is an object representing a person associated with a Stripe account. * @@ -7489,12 +7246,8 @@ export interface components { readonly person: { readonly account: string; readonly address?: components["schemas"]["address"]; - readonly address_kana?: - | (Partial & { readonly [key: string]: any }) - | null; - readonly address_kanji?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly address_kana?: Partial | null; + readonly address_kanji?: Partial | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number; readonly dob?: components["schemas"]["legal_entity_dob"]; @@ -7516,12 +7269,10 @@ export interface components { readonly object: "person"; readonly phone?: string | null; readonly relationship?: components["schemas"]["person_relationship"]; - readonly requirements?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly requirements?: Partial | null; readonly ssn_last_4_provided?: boolean; readonly verification?: components["schemas"]["legal_entity_person_verification"]; - } & { readonly [key: string]: any }; + }; readonly person_relationship: { /** 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. */ readonly director?: boolean | null; @@ -7535,7 +7286,7 @@ export interface components { readonly representative?: boolean | null; /** The person's title (e.g., CEO, Support Engineer). */ readonly title?: string | null; - } & { readonly [key: string]: any }; + }; readonly person_requirements: { /** 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. */ readonly currently_due: readonly string[]; @@ -7547,7 +7298,7 @@ export interface components { readonly past_due: readonly string[]; /** 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`. */ readonly pending_verification: readonly string[]; - } & { readonly [key: string]: any }; + }; /** * Plans define the base price, currency, and billing cycle for subscriptions. * For example, you might have a $5/month plan @@ -7587,23 +7338,21 @@ export interface components { readonly object: "plan"; /** The product whose pricing this plan determines. */ readonly product?: - | ((Partial & + | (Partial & Partial & - Partial) & { readonly [key: string]: any }) + Partial) | null; /** Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ readonly tiers?: readonly components["schemas"]["plan_tier"][] | null; /** 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. */ readonly tiers_mode?: ("graduated" | "volume") | null; /** Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. */ - readonly transform_usage?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly transform_usage?: Partial | null; /** 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). */ readonly trial_period_days?: number | null; /** 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`. */ readonly usage_type: "licensed" | "metered"; - } & { readonly [key: string]: any }; + }; readonly plan_tier: { /** Price for the entire tier. */ readonly flat_amount?: number | null; @@ -7615,7 +7364,7 @@ export interface components { readonly unit_amount_decimal?: string | null; /** Up to and including to this quantity will be contained in the tier. */ readonly up_to?: number | null; - } & { readonly [key: string]: any }; + }; readonly platform_tax_fee: { /** The Connected account that incurred this charge. */ readonly account: string; @@ -7627,7 +7376,7 @@ export interface components { readonly source_transaction: string; /** The type of tax (VAT). */ readonly type: string; - } & { readonly [key: string]: any }; + }; /** * Store representations of products you sell in `Product` objects, used in * conjunction with [SKUs](https://stripe.com/docs/api#skus). Products may be physical goods, to be shipped, or @@ -7664,9 +7413,7 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "product"; /** The dimensions of this product for shipping purposes. A SKU associated with this product can override this value by having its own `package_dimensions`. Only applicable to products of `type=good`. */ - readonly package_dimensions?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly package_dimensions?: Partial | null; /** Whether this product is a shipped good. Only applicable to products of `type=good`. */ readonly shippable?: boolean | null; /** 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. */ @@ -7679,7 +7426,7 @@ export interface components { readonly updated: number; /** A URL of a publicly-accessible webpage for this product. Only applicable to products of `type=good`. */ readonly url?: string | null; - } & { readonly [key: string]: any }; + }; /** * An early fraud warning indicates that the card issuer has notified us that a * charge may be fraudulent. @@ -7690,7 +7437,7 @@ export interface components { /** 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. */ readonly actionable: boolean; /** ID of the charge this early fraud warning is for, optionally expanded. */ - readonly charge: (Partial & Partial) & { readonly [key: string]: any }; + readonly charge: Partial & Partial; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number; /** 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`. */ @@ -7701,7 +7448,7 @@ export interface components { readonly livemode: boolean; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "radar.early_fraud_warning"; - } & { readonly [key: string]: any }; + }; /** * Value lists allow you to group values together which can then be referenced in rules. * @@ -7735,7 +7482,7 @@ export interface components { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ readonly livemode: boolean; /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -7744,7 +7491,7 @@ export interface components { readonly name: string; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "radar.value_list"; - } & { readonly [key: string]: any }; + }; /** * Value list items allow you to add specific values to a given Radar value list, which can then be used in rules. * @@ -7765,7 +7512,7 @@ export interface components { readonly value: string; /** The identifier of the value list this item belongs to. */ readonly value_list: string; - } & { readonly [key: string]: any }; + }; readonly radar_review_resource_location: { /** The city where the payment originated. */ readonly city?: string | null; @@ -7777,7 +7524,7 @@ export interface components { readonly longitude?: number | null; /** The state/county/province/region where the payment originated. */ readonly region?: string | null; - } & { readonly [key: string]: any }; + }; readonly radar_review_resource_session: { /** The browser used in this browser session (e.g., `Chrome`). */ readonly browser?: string | null; @@ -7787,7 +7534,7 @@ export interface components { readonly platform?: string | null; /** The version for the browser session (e.g., `61.0.3163.100`). */ readonly version?: string | null; - } & { readonly [key: string]: any }; + }; /** * 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, @@ -7803,26 +7550,20 @@ export interface components { */ readonly recipient: { /** Hash describing the current account on the recipient, if there is one. */ - readonly active_account?: - | (Partial & { readonly [key: string]: any }) - | null; - readonly cards?: - | ({ - readonly data: readonly components["schemas"]["card"][]; - /** True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - readonly object: "list"; - /** The URL where this list can be accessed. */ - readonly url: string; - } & { readonly [key: string]: any }) - | null; + readonly active_account?: Partial | null; + readonly cards?: { + readonly data: readonly components["schemas"]["card"][]; + /** True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + readonly object: "list"; + /** The URL where this list can be accessed. */ + readonly url: string; + } | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number; /** The default card to use for creating transfers to this recipient. */ - readonly default_card?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly default_card?: (Partial & Partial) | null; /** An arbitrary string attached to the object. Often useful for displaying to users. */ readonly description?: string | null; readonly email?: string | null; @@ -7833,19 +7574,15 @@ export interface components { /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ readonly metadata: { readonly [key: string]: string }; /** 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. */ - readonly migrated_to?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly migrated_to?: (Partial & Partial) | null; /** Full, legal name of the recipient. */ readonly name?: string | null; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "recipient"; - readonly rolled_back_from?: (Partial & Partial) & { - readonly [key: string]: any; - }; + readonly rolled_back_from?: Partial & Partial; /** Type of the recipient, one of `individual` or `corporation`. */ readonly type: string; - } & { readonly [key: string]: any }; + }; /** * `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 @@ -7857,13 +7594,9 @@ export interface components { /** Amount, in %s. */ readonly amount: number; /** Balance transaction that describes the impact on your account balance. */ - readonly balance_transaction?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly balance_transaction?: (Partial & Partial) | null; /** ID of the charge that was refunded. */ - readonly charge?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly charge?: (Partial & Partial) | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number; /** 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). */ @@ -7871,8 +7604,7 @@ export interface components { /** An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only) */ readonly description?: string; /** If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. */ - readonly failure_balance_transaction?: (Partial & - Partial) & { readonly [key: string]: any }; + readonly failure_balance_transaction?: Partial & Partial; /** If the refund failed, the reason for refund failure if known. Possible values are `lost_or_stolen_card`, `expired_or_canceled_card`, or `unknown`. */ readonly failure_reason?: string; /** Unique identifier for the object. */ @@ -7882,24 +7614,20 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "refund"; /** ID of the PaymentIntent that was refunded. */ - readonly payment_intent?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly payment_intent?: (Partial & Partial) | null; /** Reason for the refund, either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). */ readonly reason?: string | null; /** This is the transaction number that appears on email receipts sent for this refund. */ readonly receipt_number?: string | null; /** 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. */ readonly source_transfer_reversal?: - | ((Partial & Partial) & { readonly [key: string]: any }) + | (Partial & Partial) | null; /** 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. */ readonly status?: string | null; /** If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter. */ - readonly transfer_reversal?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; - } & { readonly [key: string]: any }; + readonly transfer_reversal?: (Partial & Partial) | null; + }; /** * 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. @@ -7932,7 +7660,7 @@ export interface components { * The file object representing the result of the report run (populated when * `status=succeeded`). */ - readonly result?: (Partial & { readonly [key: string]: any }) | null; + readonly result?: Partial | null; /** * 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. @@ -7944,7 +7672,7 @@ export interface components { * `status=succeeded`). Measured in seconds since the Unix epoch. */ readonly succeeded_at?: number | null; - } & { readonly [key: string]: any }; + }; /** * The Report Type resource corresponds to a particular type of report, such as * the "Activity summary" or "Itemized payouts" reports. These objects are @@ -7973,7 +7701,7 @@ export interface components { readonly updated: number; /** 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. */ readonly version: number; - } & { readonly [key: string]: any }; + }; readonly reserve_transaction: { readonly amount: number; /** 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). */ @@ -7984,7 +7712,7 @@ export interface components { readonly id: string; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "reserve_transaction"; - } & { readonly [key: string]: any }; + }; /** * Reviews can be used to supplement automated fraud detection with human expertise. * @@ -7995,9 +7723,7 @@ export interface components { /** The ZIP or postal code of the card used, if applicable. */ readonly billing_zip?: string | null; /** The charge associated with this review. */ - readonly charge?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly charge?: (Partial & Partial) | null; /** The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, or `disputed`. */ readonly closed_reason?: ("approved" | "disputed" | "refunded" | "refunded_as_fraud") | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ @@ -8007,9 +7733,7 @@ export interface components { /** The IP address where the payment originated. */ readonly ip_address?: string | null; /** 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. */ - readonly ip_address_location?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly ip_address_location?: Partial | null; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ readonly livemode: boolean; /** String representing the object's type. Objects of the same type share the same value. */ @@ -8019,16 +7743,12 @@ export interface components { /** The reason the review was opened. One of `rule` or `manual`. */ readonly opened_reason: "manual" | "rule"; /** The PaymentIntent ID associated with this review, if one exists. */ - readonly payment_intent?: (Partial & Partial) & { - readonly [key: string]: any; - }; + readonly payment_intent?: Partial & Partial; /** The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, or `disputed`. */ readonly reason: string; /** Information related to the browsing session of the user who initiated the payment. */ - readonly session?: - | (Partial & { readonly [key: string]: any }) - | null; - } & { readonly [key: string]: any }; + readonly session?: Partial | null; + }; readonly rule: { /** The action taken on the payment. */ readonly action: string; @@ -8036,7 +7756,7 @@ export interface components { readonly id: string; /** The predicate to evaluate the payment against. */ readonly predicate: string; - } & { readonly [key: string]: any }; + }; /** * 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 @@ -8050,7 +7770,7 @@ export interface components { readonly data_load_time: number; readonly error?: components["schemas"]["sigma_scheduled_query_run_error"]; /** The file object representing the results of the query. */ - readonly file?: (Partial & { readonly [key: string]: any }) | null; + readonly file?: Partial | null; /** Unique identifier for the object. */ readonly id: string; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -8065,7 +7785,7 @@ export interface components { readonly status: string; /** Title of the query. */ readonly title: string; - } & { readonly [key: string]: any }; + }; /** * 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. @@ -8092,9 +7812,7 @@ export interface components { */ readonly setup_intent: { /** ID of the Connect application that created the SetupIntent. */ - readonly application?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly application?: (Partial & Partial) | null; /** Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. */ readonly cancellation_reason?: ("abandoned" | "duplicate" | "requested_by_customer") | null; /** @@ -8111,50 +7829,36 @@ export interface components { * 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. */ readonly customer?: - | ((Partial & + | (Partial & Partial & - Partial) & { readonly [key: string]: any }) + Partial) | null; /** An arbitrary string attached to the object. Often useful for displaying to users. */ readonly description?: string | null; /** Unique identifier for the object. */ readonly id: string; /** The error encountered in the previous SetupIntent confirmation. */ - readonly last_setup_error?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly last_setup_error?: Partial | null; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ readonly livemode: boolean; /** ID of the multi use Mandate generated by the SetupIntent. */ - readonly mandate?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly mandate?: (Partial & Partial) | null; /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ readonly metadata?: { readonly [key: string]: string }; /** If present, this property tells you what actions you need to take in order for your customer to continue payment setup. */ - readonly next_action?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly next_action?: Partial | null; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "setup_intent"; /** The account (if any) for which the setup is intended. */ - readonly on_behalf_of?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly on_behalf_of?: (Partial & Partial) | null; /** ID of the payment method used with this SetupIntent. */ - readonly payment_method?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly payment_method?: (Partial & Partial) | null; /** Payment-method-specific configuration for this SetupIntent. */ - readonly payment_method_options?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly payment_method_options?: Partial | null; /** The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. */ readonly payment_method_types: readonly string[]; /** ID of the single_use Mandate generated by the SetupIntent. */ - readonly single_use_mandate?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly single_use_mandate?: (Partial & Partial) | null; /** [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`. */ readonly status: | "canceled" @@ -8169,27 +7873,27 @@ export interface components { * 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`. */ readonly usage: string; - } & { readonly [key: string]: any }; + }; readonly setup_intent_next_action: { readonly redirect_to_url?: components["schemas"]["setup_intent_next_action_redirect_to_url"]; /** Type of the next action to perform, one of `redirect_to_url` or `use_stripe_sdk`. */ readonly type: string; /** 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. */ readonly use_stripe_sdk?: { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; readonly setup_intent_next_action_redirect_to_url: { /** If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ readonly return_url?: string | null; /** The URL you must redirect your customer to in order to authenticate. */ readonly url?: string | null; - } & { readonly [key: string]: any }; + }; readonly setup_intent_payment_method_options: { readonly card?: components["schemas"]["setup_intent_payment_method_options_card"]; - } & { readonly [key: string]: any }; + }; readonly setup_intent_payment_method_options_card: { /** 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. */ readonly request_three_d_secure?: ("any" | "automatic" | "challenge_only") | null; - } & { readonly [key: string]: any }; + }; readonly shipping: { readonly address?: components["schemas"]["address"]; /** The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. */ @@ -8200,25 +7904,23 @@ export interface components { readonly phone?: string | null; /** 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. */ readonly tracking_number?: string | null; - } & { readonly [key: string]: any }; + }; readonly shipping_method: { /** 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. */ readonly amount: number; /** 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). */ readonly currency: string; /** The estimated delivery date for the given shipping method. Can be either a specific date or a range. */ - readonly delivery_estimate?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly delivery_estimate?: Partial | null; /** An arbitrary string attached to the object. Often useful for displaying to users. */ readonly description: string; /** Unique identifier for the object. */ readonly id: string; - } & { readonly [key: string]: any }; + }; readonly sigma_scheduled_query_run_error: { /** Information about the run failure. */ readonly message: string; - } & { readonly [key: string]: any }; + }; /** * 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, @@ -8250,16 +7952,14 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "sku"; /** The dimensions of this SKU for shipping purposes. */ - readonly package_dimensions?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly package_dimensions?: Partial | null; /** 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). */ readonly price: number; /** The ID of the product this SKU is associated with. The product must be currently active. */ - readonly product: (Partial & Partial) & { readonly [key: string]: any }; + readonly product: Partial & Partial; /** Time at which the object was last updated. Measured in seconds since the Unix epoch. */ readonly updated: number; - } & { readonly [key: string]: any }; + }; /** * `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 @@ -8303,7 +8003,7 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "source"; /** Information about the owner of the payment instrument that may be used or required by particular source types. */ - readonly owner?: (Partial & { readonly [key: string]: any }) | null; + readonly owner?: Partial | null; readonly p24?: components["schemas"]["source_type_p24"]; readonly receiver?: components["schemas"]["source_receiver_flow"]; readonly redirect?: components["schemas"]["source_redirect_flow"]; @@ -8337,13 +8037,13 @@ export interface components { /** 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. */ readonly usage?: string | null; readonly wechat?: components["schemas"]["source_type_wechat"]; - } & { readonly [key: string]: any }; + }; readonly source_code_verification_flow: { /** The number of attempts remaining to authenticate the source object with a verification code. */ readonly attempts_remaining: number; /** 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). */ readonly status: string; - } & { readonly [key: string]: any }; + }; /** * 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 @@ -8369,11 +8069,11 @@ export interface components { readonly status: string; /** 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`. */ readonly type: string; - } & { readonly [key: string]: any }; + }; readonly source_mandate_notification_bacs_debit_data: { /** Last 4 digits of the account number associated with the debit. */ readonly last4?: string; - } & { readonly [key: string]: any }; + }; readonly source_mandate_notification_sepa_debit_data: { /** SEPA creditor ID. */ readonly creditor_identifier?: string; @@ -8381,7 +8081,7 @@ export interface components { readonly last4?: string; /** Mandate reference associated with the debit. */ readonly mandate_reference?: string; - } & { readonly [key: string]: any }; + }; readonly source_order: { /** 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. */ readonly amount: number; @@ -8392,7 +8092,7 @@ export interface components { /** List of items constituting the order. */ readonly items?: readonly components["schemas"]["source_order_item"][] | null; readonly shipping?: components["schemas"]["shipping"]; - } & { readonly [key: string]: any }; + }; readonly source_order_item: { /** The amount (price) for this order item. */ readonly amount?: number | null; @@ -8404,10 +8104,10 @@ export interface components { readonly quantity?: number; /** The type of this order item. Must be `sku`, `tax`, or `shipping`. */ readonly type?: string | null; - } & { readonly [key: string]: any }; + }; readonly source_owner: { /** Owner's address. */ - readonly address?: (Partial & { readonly [key: string]: any }) | null; + readonly address?: Partial | null; /** Owner's email address. */ readonly email?: string | null; /** Owner's full name. */ @@ -8415,14 +8115,14 @@ export interface components { /** Owner's phone number (including extension). */ readonly phone?: string | null; /** 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. */ - readonly verified_address?: (Partial & { readonly [key: string]: any }) | null; + readonly verified_address?: Partial | null; /** 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. */ readonly verified_email?: string | null; /** 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. */ readonly verified_name?: string | null; /** 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. */ readonly verified_phone?: string | null; - } & { readonly [key: string]: any }; + }; readonly source_receiver_flow: { /** The address of the receiver source. This is the value that should be communicated to the customer to send their funds to. */ readonly address?: string | null; @@ -8436,7 +8136,7 @@ export interface components { readonly refund_attributes_method: string; /** Type of refund attribute status, one of `missing`, `requested`, or `available`. */ readonly refund_attributes_status: string; - } & { readonly [key: string]: any }; + }; readonly source_redirect_flow: { /** 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`. */ readonly failure_reason?: string | null; @@ -8446,7 +8146,7 @@ export interface components { readonly status: string; /** The URL provided to you to redirect a customer to as part of a `redirect` authentication flow. */ readonly url: string; - } & { readonly [key: string]: any }; + }; /** * 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 @@ -8493,7 +8193,7 @@ export interface components { | "sofort" | "three_d_secure" | "wechat"; - } & { readonly [key: string]: any }; + }; readonly source_transaction_ach_credit_transfer_data: { /** Customer data associated with the transfer. */ readonly customer_data?: string; @@ -8503,7 +8203,7 @@ export interface components { readonly last4?: string; /** Routing number associated with the transfer. */ readonly routing_number?: string; - } & { readonly [key: string]: any }; + }; readonly source_transaction_chf_credit_transfer_data: { /** Reference associated with the transfer. */ readonly reference?: string; @@ -8515,7 +8215,7 @@ export interface components { readonly sender_iban?: string; /** Sender's name. */ readonly sender_name?: string; - } & { readonly [key: string]: any }; + }; readonly source_transaction_gbp_credit_transfer_data: { /** Bank account fingerprint associated with the Stripe owned bank account receiving the transfer. */ readonly fingerprint?: string; @@ -8531,13 +8231,13 @@ export interface components { readonly sender_name?: string; /** Sender sort code associated with the transfer. */ readonly sender_sort_code?: string; - } & { readonly [key: string]: any }; + }; readonly source_transaction_paper_check_data: { /** Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch. */ readonly available_at?: string; /** Comma-separated list of invoice IDs associated with the paper check. */ readonly invoices?: string; - } & { readonly [key: string]: any }; + }; readonly source_transaction_sepa_credit_transfer_data: { /** Reference associated with the transfer. */ readonly reference?: string; @@ -8545,7 +8245,7 @@ export interface components { readonly sender_iban?: string; /** Sender's name. */ readonly sender_name?: string; - } & { readonly [key: string]: any }; + }; readonly source_type_ach_credit_transfer: { readonly account_number?: string | null; readonly bank_name?: string | null; @@ -8555,7 +8255,7 @@ export interface components { readonly refund_routing_number?: string | null; readonly routing_number?: string | null; readonly swift_code?: string | null; - } & { readonly [key: string]: any }; + }; readonly source_type_ach_debit: { readonly bank_name?: string | null; readonly country?: string | null; @@ -8563,17 +8263,17 @@ export interface components { readonly last4?: string | null; readonly routing_number?: string | null; readonly type?: string | null; - } & { readonly [key: string]: any }; + }; readonly source_type_alipay: { readonly data_string?: string | null; readonly native_url?: string | null; readonly statement_descriptor?: string | null; - } & { readonly [key: string]: any }; + }; readonly source_type_au_becs_debit: { readonly bsb_number?: string | null; readonly fingerprint?: string | null; readonly last4?: string | null; - } & { readonly [key: string]: any }; + }; readonly source_type_bancontact: { readonly bank_code?: string | null; readonly bank_name?: string | null; @@ -8581,7 +8281,7 @@ export interface components { readonly iban_last4?: string | null; readonly preferred_language?: string | null; readonly statement_descriptor?: string | null; - } & { readonly [key: string]: any }; + }; readonly source_type_card: { readonly address_line1_check?: string | null; readonly address_zip_check?: string | null; @@ -8597,7 +8297,7 @@ export interface components { readonly name?: string | null; readonly three_d_secure?: string; readonly tokenization_method?: string | null; - } & { readonly [key: string]: any }; + }; readonly source_type_card_present: { readonly application_cryptogram?: string; readonly application_preferred_name?: string; @@ -8622,23 +8322,23 @@ export interface components { readonly reader?: string | null; readonly terminal_verification_results?: string; readonly transaction_status_information?: string; - } & { readonly [key: string]: any }; + }; readonly source_type_eps: { readonly reference?: string | null; readonly statement_descriptor?: string | null; - } & { readonly [key: string]: any }; + }; readonly source_type_giropay: { readonly bank_code?: string | null; readonly bank_name?: string | null; readonly bic?: string | null; readonly statement_descriptor?: string | null; - } & { readonly [key: string]: any }; + }; readonly source_type_ideal: { readonly bank?: string | null; readonly bic?: string | null; readonly iban_last4?: string | null; readonly statement_descriptor?: string | null; - } & { readonly [key: string]: any }; + }; readonly source_type_klarna: { readonly background_image_url?: string; readonly client_token?: string | null; @@ -8665,7 +8365,7 @@ export interface components { readonly redirect_url?: string; readonly shipping_first_name?: string; readonly shipping_last_name?: string; - } & { readonly [key: string]: any }; + }; readonly source_type_multibanco: { readonly entity?: string | null; readonly reference?: string | null; @@ -8677,10 +8377,10 @@ export interface components { readonly refund_account_holder_address_state?: string | null; readonly refund_account_holder_name?: string | null; readonly refund_iban?: string | null; - } & { readonly [key: string]: any }; + }; readonly source_type_p24: { readonly reference?: string | null; - } & { readonly [key: string]: any }; + }; readonly source_type_sepa_debit: { readonly bank_code?: string | null; readonly branch_code?: string | null; @@ -8689,7 +8389,7 @@ export interface components { readonly last4?: string | null; readonly mandate_reference?: string | null; readonly mandate_url?: string | null; - } & { readonly [key: string]: any }; + }; readonly source_type_sofort: { readonly bank_code?: string | null; readonly bank_name?: string | null; @@ -8698,7 +8398,7 @@ export interface components { readonly iban_last4?: string | null; readonly preferred_language?: string | null; readonly statement_descriptor?: string | null; - } & { readonly [key: string]: any }; + }; readonly source_type_three_d_secure: { readonly address_line1_check?: string | null; readonly address_zip_check?: string | null; @@ -8717,12 +8417,12 @@ export interface components { readonly name?: string | null; readonly three_d_secure?: string; readonly tokenization_method?: string | null; - } & { readonly [key: string]: any }; + }; readonly source_type_wechat: { readonly prepay_id?: string; readonly qr_code_url?: string | null; readonly statement_descriptor?: string; - } & { readonly [key: string]: any }; + }; readonly status_transitions: { /** The time that the order was canceled. */ readonly canceled?: number | null; @@ -8732,7 +8432,7 @@ export interface components { readonly paid?: number | null; /** The time that the order was returned. */ readonly returned?: number | null; - } & { readonly [key: string]: any }; + }; /** * Subscriptions allow you to charge a customer on a recurring basis. * @@ -8744,9 +8444,7 @@ export interface components { /** Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. */ readonly billing_cycle_anchor: number; /** Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ - readonly billing_thresholds?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly billing_thresholds?: Partial | null; /** A date in the future at which the subscription will automatically get canceled */ readonly cancel_at?: number | null; /** 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. */ @@ -8762,28 +8460,26 @@ export interface components { /** Start of the current period that the subscription has been invoiced for. */ readonly current_period_start: number; /** ID of the customer who owns the subscription. */ - readonly customer: (Partial & + readonly customer: Partial & Partial & - Partial) & { readonly [key: string]: any }; + Partial; /** 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`. */ readonly days_until_due?: number | null; /** 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. */ - readonly default_payment_method?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly default_payment_method?: (Partial & Partial) | null; /** 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. */ readonly default_source?: - | ((Partial & + | (Partial & Partial & Partial & Partial & Partial & - Partial) & { readonly [key: string]: any }) + Partial) | null; /** 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. */ readonly default_tax_rates?: readonly components["schemas"]["tax_rate"][] | null; /** 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. */ - readonly discount?: (Partial & { readonly [key: string]: any }) | null; + readonly discount?: Partial | null; /** If the subscription has ended, the date the subscription ended. */ readonly ended_at?: number | null; /** Unique identifier for the object. */ @@ -8798,11 +8494,9 @@ export interface components { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; /** The most recent invoice this subscription has generated. */ - readonly latest_invoice?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly latest_invoice?: (Partial & Partial) | null; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ readonly livemode: boolean; /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -8812,33 +8506,21 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "subscription"; /** If specified, payment collection for this subscription will be paused. */ - readonly pause_collection?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly pause_collection?: Partial | null; /** 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. */ - readonly pending_invoice_item_interval?: - | (Partial & { - readonly [key: string]: any; - }) - | null; + readonly pending_invoice_item_interval?: Partial< + components["schemas"]["subscription_pending_invoice_item_interval"] + > | null; /** 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). */ - readonly pending_setup_intent?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly pending_setup_intent?: (Partial & Partial) | null; /** 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. */ - readonly pending_update?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly pending_update?: Partial | null; /** Hash describing the plan the customer is subscribed to. Only set if the subscription contains a single plan. */ - readonly plan?: (Partial & { readonly [key: string]: any }) | null; + readonly plan?: Partial | null; /** 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. */ readonly quantity?: number | null; /** The schedule attached to the subscription */ - readonly schedule?: - | ((Partial & Partial) & { - readonly [key: string]: any; - }) - | null; + readonly schedule?: (Partial & Partial) | null; /** Date when the subscription was first created. The date might differ from the `created` date due to backdating. */ readonly start_date: number; /** @@ -8859,22 +8541,20 @@ export interface components { readonly trial_end?: number | null; /** If the subscription has a trial, the beginning of that trial. */ readonly trial_start?: number | null; - } & { readonly [key: string]: any }; + }; readonly subscription_billing_thresholds: { /** Monetary threshold that triggers the subscription to create an invoice */ readonly amount_gte?: number | null; /** 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`. */ readonly reset_billing_cycle_anchor?: boolean | null; - } & { readonly [key: string]: any }; + }; /** * Subscription items allow you to create customer subscriptions with more than * one plan, making it easy to represent complex billing relationships. */ readonly subscription_item: { /** Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period */ - readonly billing_thresholds?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly billing_thresholds?: Partial | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number; /** Unique identifier for the object. */ @@ -8890,17 +8570,17 @@ export interface components { readonly subscription: string; /** 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`. */ readonly tax_rates?: readonly components["schemas"]["tax_rate"][] | null; - } & { readonly [key: string]: any }; + }; readonly subscription_item_billing_thresholds: { /** Usage threshold that triggers the subscription to create an invoice */ readonly usage_gte?: number | null; - } & { readonly [key: string]: any }; + }; readonly subscription_pending_invoice_item_interval: { /** Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. */ readonly interval: "day" | "month" | "week" | "year"; /** 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). */ readonly interval_count: number; - } & { readonly [key: string]: any }; + }; /** * A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes. * @@ -8914,13 +8594,11 @@ export interface components { /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number; /** Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. */ - readonly current_phase?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly current_phase?: Partial | null; /** ID of the customer who owns the subscription schedule. */ - readonly customer: (Partial & + readonly customer: Partial & Partial & - Partial) & { readonly [key: string]: any }; + Partial; readonly default_settings: components["schemas"]["subscription_schedules_resource_default_settings"]; /** Behavior of the subscription schedule and underlying subscription when it ends. */ readonly end_behavior: "cancel" | "none" | "release" | "renew"; @@ -8941,61 +8619,51 @@ export interface components { /** 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). */ readonly status: "active" | "canceled" | "completed" | "not_started" | "released"; /** ID of the subscription managed by the subscription schedule. */ - readonly subscription?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; - } & { readonly [key: string]: any }; + readonly subscription?: (Partial & Partial) | null; + }; /** A phase item describes the plan and quantity of a phase. */ readonly subscription_schedule_configuration_item: { /** Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period */ - readonly billing_thresholds?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly billing_thresholds?: Partial | null; /** ID of the plan to which the customer should be subscribed. */ - readonly plan: (Partial & + readonly plan: Partial & Partial & - Partial) & { readonly [key: string]: any }; + Partial; /** Quantity of the plan to which the customer should be subscribed. */ readonly quantity?: number; /** 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`. */ readonly tax_rates?: readonly components["schemas"]["tax_rate"][] | null; - } & { readonly [key: string]: any }; + }; readonly subscription_schedule_current_phase: { /** The end of this phase of the subscription schedule. */ readonly end_date: number; /** The start of this phase of the subscription schedule. */ readonly start_date: number; - } & { readonly [key: string]: any }; + }; /** A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period. */ readonly subscription_schedule_phase_configuration: { /** 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. */ readonly application_fee_percent?: number | null; /** Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ - readonly billing_thresholds?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly billing_thresholds?: Partial | null; /** 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. */ readonly collection_method?: ("charge_automatically" | "send_invoice") | null; /** ID of the coupon to use during this phase of the subscription schedule. */ readonly coupon?: - | ((Partial & + | (Partial & Partial & - Partial) & { readonly [key: string]: any }) + Partial) | null; /** 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. */ - readonly default_payment_method?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly default_payment_method?: (Partial & Partial) | null; /** The default tax rates to apply to the subscription during this phase of the subscription schedule. */ readonly default_tax_rates?: readonly components["schemas"]["tax_rate"][] | null; /** The end of this phase of the subscription schedule. */ readonly end_date: number; /** The subscription schedule's default invoice settings. */ - readonly invoice_settings?: - | (Partial & { - readonly [key: string]: any; - }) - | null; + readonly invoice_settings?: Partial< + components["schemas"]["invoice_setting_subscription_schedule_setting"] + > | null; /** Plans to subscribe during this phase of the subscription schedule. */ readonly plans: readonly components["schemas"]["subscription_schedule_configuration_item"][]; /** Controls whether or not the subscription schedule will prorate when transitioning to this phase. Values are `create_prorations` and `none`. */ @@ -9006,25 +8674,19 @@ export interface components { readonly tax_percent?: number | null; /** When the trial ends within the phase. */ readonly trial_end?: number | null; - } & { readonly [key: string]: any }; + }; readonly subscription_schedules_resource_default_settings: { /** Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ - readonly billing_thresholds?: - | (Partial & { readonly [key: string]: any }) - | null; + readonly billing_thresholds?: Partial | null; /** 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. */ readonly collection_method?: ("charge_automatically" | "send_invoice") | null; /** 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. */ - readonly default_payment_method?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly default_payment_method?: (Partial & Partial) | null; /** The subscription schedule's default invoice settings. */ - readonly invoice_settings?: - | (Partial & { - readonly [key: string]: any; - }) - | null; - } & { readonly [key: string]: any }; + readonly invoice_settings?: Partial< + components["schemas"]["invoice_setting_subscription_schedule_setting"] + > | null; + }; /** * The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription * should be paused. @@ -9034,7 +8696,7 @@ export interface components { readonly behavior: "keep_as_draft" | "mark_uncollectible" | "void"; /** The time after which the subscription will resume collecting payments. */ readonly resumes_at?: number | null; - } & { readonly [key: string]: any }; + }; /** * Pending Updates store the changes pending from a previous update that will be applied * to the Subscription upon successful payment. @@ -9050,7 +8712,7 @@ export interface components { readonly trial_end?: number | null; /** 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. */ readonly trial_from_plan?: boolean | null; - } & { readonly [key: string]: any }; + }; readonly tax_deducted_at_source: { /** Unique identifier for the object. */ readonly id: string; @@ -9062,7 +8724,7 @@ export interface components { readonly period_start: number; /** The TAN that was supplied to Stripe when TDS was assessed */ readonly tax_deduction_account_number: string; - } & { readonly [key: string]: any }; + }; /** * 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. @@ -9075,9 +8737,7 @@ export interface components { /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number; /** ID of the customer. */ - readonly customer: (Partial & Partial) & { - readonly [key: string]: any; - }; + readonly customer: Partial & Partial; /** Unique identifier for the object. */ readonly id: string; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -9113,7 +8773,7 @@ export interface components { /** Value of the tax ID. */ readonly value: string; readonly verification: components["schemas"]["tax_id_verification"]; - } & { readonly [key: string]: any }; + }; readonly tax_id_verification: { /** Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`. */ readonly status: "pending" | "unavailable" | "unverified" | "verified"; @@ -9121,7 +8781,7 @@ export interface components { readonly verified_address?: string | null; /** Verified name. */ readonly verified_name?: string | null; - } & { readonly [key: string]: any }; + }; /** * Tax rates can be applied to invoices and subscriptions to collect tax. * @@ -9150,7 +8810,7 @@ export interface components { readonly object: "tax_rate"; /** This represents the tax rate percent out of 100. */ readonly percentage: number; - } & { readonly [key: string]: any }; + }; /** * A Connection Token is used by the Stripe Terminal SDK to connect to a reader. * @@ -9163,7 +8823,7 @@ export interface components { readonly object: "terminal.connection_token"; /** Your application should pass this token to the Stripe Terminal SDK. */ readonly secret: string; - } & { readonly [key: string]: any }; + }; /** * A Location represents a grouping of readers. * @@ -9181,7 +8841,7 @@ export interface components { readonly metadata: { readonly [key: string]: string }; /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "terminal.location"; - } & { readonly [key: string]: any }; + }; /** * A Reader represents a physical device for accepting payment details. * @@ -9210,7 +8870,7 @@ export interface components { readonly serial_number: string; /** The networking status of the reader. */ readonly status?: string | null; - } & { readonly [key: string]: any }; + }; /** * 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 @@ -9236,7 +8896,7 @@ export interface components { readonly redirect_url?: string | null; /** 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. */ readonly status: string; - } & { readonly [key: string]: any }; + }; readonly three_d_secure_details: { /** Whether or not authentication was performed. 3D Secure will succeed without authentication when the card is not enrolled. */ readonly authenticated?: boolean; @@ -9244,11 +8904,11 @@ export interface components { readonly succeeded?: boolean; /** The version of 3D Secure that was used for this payment. */ readonly version: string; - } & { readonly [key: string]: any }; + }; readonly three_d_secure_usage: { /** Whether 3D Secure is supported on this card. */ readonly supported: boolean; - } & { readonly [key: string]: any }; + }; /** * Tokenization is the process Stripe uses to collect sensitive card or bank * account details, or personally identifiable information (PII), directly from @@ -9290,7 +8950,7 @@ export interface components { readonly type: string; /** Whether this token has already been used (tokens can be used only once). */ readonly used: boolean; - } & { readonly [key: string]: any }; + }; /** * 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 @@ -9302,9 +8962,7 @@ export interface components { /** Amount transferred. */ readonly amount: number; /** 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. */ - readonly balance_transaction?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly balance_transaction?: (Partial & Partial) | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number; /** 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). */ @@ -9332,7 +8990,7 @@ export interface components { readonly status: "canceled" | "failed" | "pending" | "reversed" | "succeeded"; /** A string that identifies this top-up as part of a group. */ readonly transfer_group?: string | null; - } & { readonly [key: string]: any }; + }; /** * A `Transfer` object is created when you move funds between Stripe accounts as * part of Connect. @@ -9351,9 +9009,7 @@ export interface components { /** Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). */ readonly amount_reversed: number; /** Balance transaction that describes the impact of this transfer on your account balance. */ - readonly balance_transaction?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly balance_transaction?: (Partial & Partial) | null; /** Time that this record of the transfer was first created. */ readonly created: number; /** 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). */ @@ -9361,13 +9017,9 @@ export interface components { /** An arbitrary string attached to the object. Often useful for displaying to users. */ readonly description?: string | null; /** ID of the Stripe account the transfer was sent to. */ - readonly destination?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly destination?: (Partial & Partial) | null; /** If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer. */ - readonly destination_payment?: (Partial & Partial) & { - readonly [key: string]: any; - }; + readonly destination_payment?: Partial & Partial; /** Unique identifier for the object. */ readonly id: string; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -9386,18 +9038,16 @@ export interface components { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; /** Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. */ readonly reversed: boolean; /** ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance. */ - readonly source_transaction?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly source_transaction?: (Partial & Partial) | null; /** The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. */ readonly source_type?: string | null; /** 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. */ readonly transfer_group?: string | null; - } & { readonly [key: string]: any }; + }; readonly transfer_data: { /** 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). */ readonly amount?: number; @@ -9406,10 +9056,8 @@ export interface components { * reporting, and where funds from the payment will be transferred to upon * payment success. */ - readonly destination: (Partial & Partial) & { - readonly [key: string]: any; - }; - } & { readonly [key: string]: any }; + readonly destination: Partial & Partial; + }; /** * [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 @@ -9429,17 +9077,13 @@ export interface components { /** Amount, in %s. */ readonly amount: number; /** Balance transaction that describes the impact on your account balance. */ - readonly balance_transaction?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly balance_transaction?: (Partial & Partial) | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number; /** 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). */ readonly currency: string; /** Linked payment refund for the transfer reversal. */ - readonly destination_payment_refund?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly destination_payment_refund?: (Partial & Partial) | null; /** Unique identifier for the object. */ readonly id: 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. */ @@ -9447,14 +9091,10 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ readonly object: "transfer_reversal"; /** ID of the refund responsible for the transfer reversal. */ - readonly source_refund?: - | ((Partial & Partial) & { readonly [key: string]: any }) - | null; + readonly source_refund?: (Partial & Partial) | null; /** ID of the transfer that was reversed. */ - readonly transfer: (Partial & Partial) & { - readonly [key: string]: any; - }; - } & { readonly [key: string]: any }; + readonly transfer: Partial & Partial; + }; readonly transfer_schedule: { /** The number of days charges for the account will be held before being paid out. */ readonly delay_days: number; @@ -9464,13 +9104,13 @@ export interface components { readonly monthly_anchor?: number; /** The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly. */ readonly weekly_anchor?: string; - } & { readonly [key: string]: any }; + }; readonly transform_usage: { /** Divide usage by this number. */ readonly divide_by: number; /** After division, either round the result `up` or `down`. */ readonly round: "down" | "up"; - } & { readonly [key: string]: any }; + }; /** * Usage records allow you to report customer usage and metrics to Stripe for * metered billing of subscription plans. @@ -9490,7 +9130,7 @@ export interface components { readonly subscription_item: string; /** The timestamp when this usage occurred. */ readonly timestamp: number; - } & { readonly [key: string]: any }; + }; readonly usage_record_summary: { /** Unique identifier for the object. */ readonly id: string; @@ -9505,7 +9145,7 @@ export interface components { readonly subscription_item: string; /** The total usage within this usage period. */ readonly total_usage: number; - } & { readonly [key: string]: any }; + }; /** * 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 @@ -9540,7 +9180,7 @@ export interface components { readonly status: string; /** The URL of the webhook endpoint. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; } @@ -9665,18 +9305,16 @@ export interface operations { /** An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ readonly account_token?: string; /** 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. */ - readonly bank_account?: (Partial< - { - readonly account_holder_name?: string; - readonly account_holder_type?: "company" | "individual"; - readonly account_number: string; - readonly country: string; - readonly currency?: string; - readonly object?: "bank_account"; - readonly routing_number?: string; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly bank_account?: Partial<{ + readonly account_holder_name?: string; + readonly account_holder_type?: "company" | "individual"; + readonly account_number: string; + readonly country: string; + readonly currency?: string; + readonly object?: "bank_account"; + readonly routing_number?: string; + }> & + Partial; /** Business information about the account. */ readonly business_profile?: { readonly mcc?: string; @@ -9686,7 +9324,7 @@ export interface operations { readonly support_phone?: string; readonly support_url?: string; readonly url?: string; - } & { readonly [key: string]: any }; + }; /** The business type. */ readonly business_type?: "company" | "government_entity" | "individual" | "non_profit"; /** Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`. */ @@ -9698,7 +9336,7 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; readonly address_kana?: { readonly city?: string; readonly country?: string; @@ -9707,7 +9345,7 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; readonly address_kanji?: { readonly city?: string; readonly country?: string; @@ -9716,7 +9354,7 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; readonly directors_provided?: boolean; readonly executives_provided?: boolean; readonly name?: string; @@ -9748,9 +9386,9 @@ export interface operations { readonly document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; + }; /** 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). */ readonly default_currency?: string; /** 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. */ @@ -9768,7 +9406,7 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; readonly address_kana?: { readonly city?: string; readonly country?: string; @@ -9777,7 +9415,7 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; readonly address_kanji?: { readonly city?: string; readonly country?: string; @@ -9786,15 +9424,13 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; - readonly dob?: (Partial< - { - readonly day: number; - readonly month: number; - readonly year: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + }; + readonly dob?: Partial<{ + readonly day: number; + readonly month: number; + readonly year: number; + }> & + Partial<"">; readonly email?: string; readonly first_name?: string; readonly first_name_kana?: string; @@ -9805,26 +9441,22 @@ export interface operations { readonly last_name_kana?: string; readonly last_name_kanji?: string; readonly maiden_name?: string; - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; readonly phone?: string; readonly ssn_last_4?: string; readonly verification?: { readonly additional_document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; + }; readonly document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; - /** Set of key-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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; + }; + }; }; + /** Set of key-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`. */ + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** 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. */ readonly requested_capabilities?: readonly ( | "au_becs_debit_payments" @@ -9842,23 +9474,23 @@ export interface operations { readonly logo?: string; readonly primary_color?: string; readonly secondary_color?: string; - } & { readonly [key: string]: any }; + }; readonly card_payments?: { readonly decline_on?: { readonly avs_failure?: boolean; readonly cvc_failure?: boolean; - } & { readonly [key: string]: any }; + }; readonly statement_descriptor_prefix?: string; - } & { readonly [key: string]: any }; + }; readonly payments?: { readonly statement_descriptor?: string; readonly statement_descriptor_kana?: string; readonly statement_descriptor_kanji?: string; - } & { readonly [key: string]: any }; + }; readonly payouts?: { readonly debit_negative_balances?: boolean; readonly schedule?: { - readonly delay_days?: (Partial<"minimum"> & Partial) & { readonly [key: string]: any }; + readonly delay_days?: Partial<"minimum"> & Partial; readonly interval?: "daily" | "manual" | "monthly" | "weekly"; readonly monthly_anchor?: number; readonly weekly_anchor?: @@ -9869,16 +9501,16 @@ export interface operations { | "thursday" | "tuesday" | "wednesday"; - } & { readonly [key: string]: any }; + }; readonly statement_descriptor?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance). */ readonly tos_acceptance?: { readonly date?: number; readonly ip?: string; readonly user_agent?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -9933,18 +9565,16 @@ export interface operations { readonly content: { readonly "application/x-www-form-urlencoded": { /** 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. */ - readonly bank_account?: (Partial< - { - readonly account_holder_name?: string; - readonly account_holder_type?: "company" | "individual"; - readonly account_number: string; - readonly country: string; - readonly currency?: string; - readonly object?: "bank_account"; - readonly routing_number?: string; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly bank_account?: Partial<{ + readonly account_holder_name?: string; + readonly account_holder_type?: "company" | "individual"; + readonly account_number: string; + readonly country: string; + readonly currency?: string; + readonly object?: "bank_account"; + readonly routing_number?: string; + }> & + Partial; /** 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. */ readonly default_for_currency?: boolean; /** Specifies which fields in the response should be expanded. */ @@ -10040,9 +9670,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** Cardholder name. */ readonly name?: string; }; @@ -10096,7 +9724,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -10195,15 +9823,15 @@ export interface operations { readonly content: { readonly "application/json": { /** The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ - readonly data: readonly ((Partial & - Partial) & { readonly [key: string]: any })[]; + readonly data: readonly (Partial & + Partial)[]; /** True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean; /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -10239,18 +9867,16 @@ export interface operations { readonly content: { readonly "application/x-www-form-urlencoded": { /** 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. */ - readonly bank_account?: (Partial< - { - readonly account_holder_name?: string; - readonly account_holder_type?: "company" | "individual"; - readonly account_number: string; - readonly country: string; - readonly currency?: string; - readonly object?: "bank_account"; - readonly routing_number?: string; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly bank_account?: Partial<{ + readonly account_holder_name?: string; + readonly account_holder_type?: "company" | "individual"; + readonly account_number: string; + readonly country: string; + readonly currency?: string; + readonly object?: "bank_account"; + readonly routing_number?: string; + }> & + Partial; /** 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. */ readonly default_for_currency?: boolean; /** Specifies which fields in the response should be expanded. */ @@ -10346,9 +9972,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** Cardholder name. */ readonly name?: string; }; @@ -10460,7 +10084,7 @@ export interface operations { readonly executive?: boolean; readonly owner?: boolean; readonly representative?: boolean; - } & { readonly [key: string]: any }; + }; /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ readonly starting_after?: string; }; @@ -10477,7 +10101,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -10521,7 +10145,7 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; /** The Kana variation of the person's address (Japan only). */ readonly address_kana?: { readonly city?: string; @@ -10531,7 +10155,7 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; /** The Kanji variation of the person's address (Japan only). */ readonly address_kanji?: { readonly city?: string; @@ -10541,16 +10165,14 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; /** The person's date of birth. */ - readonly dob?: (Partial< - { - readonly day: number; - readonly month: number; - readonly year: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly dob?: Partial<{ + readonly day: number; + readonly month: number; + readonly year: number; + }> & + Partial<"">; /** The person's email address. */ readonly email?: string; /** Specifies which fields in the response should be expanded. */ @@ -10574,9 +10196,7 @@ export interface operations { /** The person's maiden name. */ readonly maiden_name?: 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ readonly person_token?: string; /** The person's phone number. */ @@ -10586,10 +10206,10 @@ export interface operations { readonly director?: boolean; readonly executive?: boolean; readonly owner?: boolean; - readonly percent_ownership?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly percent_ownership?: Partial & Partial<"">; readonly representative?: boolean; readonly title?: string; - } & { readonly [key: string]: any }; + }; /** The last 4 digits of the person's social security number. */ readonly ssn_last_4?: string; /** The person's verification status. */ @@ -10597,12 +10217,12 @@ export interface operations { readonly additional_document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; + }; readonly document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; }; }; }; @@ -10671,7 +10291,7 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; /** The Kana variation of the person's address (Japan only). */ readonly address_kana?: { readonly city?: string; @@ -10681,7 +10301,7 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; /** The Kanji variation of the person's address (Japan only). */ readonly address_kanji?: { readonly city?: string; @@ -10691,16 +10311,14 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; /** The person's date of birth. */ - readonly dob?: (Partial< - { - readonly day: number; - readonly month: number; - readonly year: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly dob?: Partial<{ + readonly day: number; + readonly month: number; + readonly year: number; + }> & + Partial<"">; /** The person's email address. */ readonly email?: string; /** Specifies which fields in the response should be expanded. */ @@ -10724,9 +10342,7 @@ export interface operations { /** The person's maiden name. */ readonly maiden_name?: 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ readonly person_token?: string; /** The person's phone number. */ @@ -10736,10 +10352,10 @@ export interface operations { readonly director?: boolean; readonly executive?: boolean; readonly owner?: boolean; - readonly percent_ownership?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly percent_ownership?: Partial & Partial<"">; readonly representative?: boolean; readonly title?: string; - } & { readonly [key: string]: any }; + }; /** The last 4 digits of the person's social security number. */ readonly ssn_last_4?: string; /** The person's verification status. */ @@ -10747,12 +10363,12 @@ export interface operations { readonly additional_document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; + }; readonly document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; }; }; }; @@ -10800,7 +10416,7 @@ export interface operations { readonly executive?: boolean; readonly owner?: boolean; readonly representative?: boolean; - } & { readonly [key: string]: any }; + }; /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ readonly starting_after?: string; }; @@ -10817,7 +10433,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -10861,7 +10477,7 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; /** The Kana variation of the person's address (Japan only). */ readonly address_kana?: { readonly city?: string; @@ -10871,7 +10487,7 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; /** The Kanji variation of the person's address (Japan only). */ readonly address_kanji?: { readonly city?: string; @@ -10881,16 +10497,14 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; /** The person's date of birth. */ - readonly dob?: (Partial< - { - readonly day: number; - readonly month: number; - readonly year: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly dob?: Partial<{ + readonly day: number; + readonly month: number; + readonly year: number; + }> & + Partial<"">; /** The person's email address. */ readonly email?: string; /** Specifies which fields in the response should be expanded. */ @@ -10914,9 +10528,7 @@ export interface operations { /** The person's maiden name. */ readonly maiden_name?: 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ readonly person_token?: string; /** The person's phone number. */ @@ -10926,10 +10538,10 @@ export interface operations { readonly director?: boolean; readonly executive?: boolean; readonly owner?: boolean; - readonly percent_ownership?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly percent_ownership?: Partial & Partial<"">; readonly representative?: boolean; readonly title?: string; - } & { readonly [key: string]: any }; + }; /** The last 4 digits of the person's social security number. */ readonly ssn_last_4?: string; /** The person's verification status. */ @@ -10937,12 +10549,12 @@ export interface operations { readonly additional_document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; + }; readonly document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; }; }; }; @@ -11011,7 +10623,7 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; /** The Kana variation of the person's address (Japan only). */ readonly address_kana?: { readonly city?: string; @@ -11021,7 +10633,7 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; /** The Kanji variation of the person's address (Japan only). */ readonly address_kanji?: { readonly city?: string; @@ -11031,16 +10643,14 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; /** The person's date of birth. */ - readonly dob?: (Partial< - { - readonly day: number; - readonly month: number; - readonly year: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly dob?: Partial<{ + readonly day: number; + readonly month: number; + readonly year: number; + }> & + Partial<"">; /** The person's email address. */ readonly email?: string; /** Specifies which fields in the response should be expanded. */ @@ -11064,9 +10674,7 @@ export interface operations { /** The person's maiden name. */ readonly maiden_name?: 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ readonly person_token?: string; /** The person's phone number. */ @@ -11076,10 +10684,10 @@ export interface operations { readonly director?: boolean; readonly executive?: boolean; readonly owner?: boolean; - readonly percent_ownership?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly percent_ownership?: Partial & Partial<"">; readonly representative?: boolean; readonly title?: string; - } & { readonly [key: string]: any }; + }; /** The last 4 digits of the person's social security number. */ readonly ssn_last_4?: string; /** The person's verification status. */ @@ -11087,12 +10695,12 @@ export interface operations { readonly additional_document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; + }; readonly document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; }; }; }; @@ -11163,15 +10771,13 @@ export interface operations { readonly GetAccounts: { readonly parameters: { readonly query: { - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -11194,7 +10800,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -11238,18 +10844,16 @@ export interface operations { /** An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ readonly account_token?: string; /** 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. */ - readonly bank_account?: (Partial< - { - readonly account_holder_name?: string; - readonly account_holder_type?: "company" | "individual"; - readonly account_number: string; - readonly country: string; - readonly currency?: string; - readonly object?: "bank_account"; - readonly routing_number?: string; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly bank_account?: Partial<{ + readonly account_holder_name?: string; + readonly account_holder_type?: "company" | "individual"; + readonly account_number: string; + readonly country: string; + readonly currency?: string; + readonly object?: "bank_account"; + readonly routing_number?: string; + }> & + Partial; /** Business information about the account. */ readonly business_profile?: { readonly mcc?: string; @@ -11259,7 +10863,7 @@ export interface operations { readonly support_phone?: string; readonly support_url?: string; readonly url?: string; - } & { readonly [key: string]: any }; + }; /** The business type. */ readonly business_type?: "company" | "government_entity" | "individual" | "non_profit"; /** Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`. */ @@ -11271,7 +10875,7 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; readonly address_kana?: { readonly city?: string; readonly country?: string; @@ -11280,7 +10884,7 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; readonly address_kanji?: { readonly city?: string; readonly country?: string; @@ -11289,7 +10893,7 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; readonly directors_provided?: boolean; readonly executives_provided?: boolean; readonly name?: string; @@ -11321,9 +10925,9 @@ export interface operations { readonly document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; + }; /** 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. */ readonly country?: string; /** 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). */ @@ -11343,7 +10947,7 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; readonly address_kana?: { readonly city?: string; readonly country?: string; @@ -11352,7 +10956,7 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; readonly address_kanji?: { readonly city?: string; readonly country?: string; @@ -11361,15 +10965,13 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; - readonly dob?: (Partial< - { - readonly day: number; - readonly month: number; - readonly year: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + }; + readonly dob?: Partial<{ + readonly day: number; + readonly month: number; + readonly year: number; + }> & + Partial<"">; readonly email?: string; readonly first_name?: string; readonly first_name_kana?: string; @@ -11380,26 +10982,22 @@ export interface operations { readonly last_name_kana?: string; readonly last_name_kanji?: string; readonly maiden_name?: string; - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; readonly phone?: string; readonly ssn_last_4?: string; readonly verification?: { readonly additional_document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; + }; readonly document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; - /** Set of key-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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; + }; + }; }; + /** Set of key-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`. */ + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** 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. */ readonly requested_capabilities?: readonly ( | "au_becs_debit_payments" @@ -11417,23 +11015,23 @@ export interface operations { readonly logo?: string; readonly primary_color?: string; readonly secondary_color?: string; - } & { readonly [key: string]: any }; + }; readonly card_payments?: { readonly decline_on?: { readonly avs_failure?: boolean; readonly cvc_failure?: boolean; - } & { readonly [key: string]: any }; + }; readonly statement_descriptor_prefix?: string; - } & { readonly [key: string]: any }; + }; readonly payments?: { readonly statement_descriptor?: string; readonly statement_descriptor_kana?: string; readonly statement_descriptor_kanji?: string; - } & { readonly [key: string]: any }; + }; readonly payouts?: { readonly debit_negative_balances?: boolean; readonly schedule?: { - readonly delay_days?: (Partial<"minimum"> & Partial) & { readonly [key: string]: any }; + readonly delay_days?: Partial<"minimum"> & Partial; readonly interval?: "daily" | "manual" | "monthly" | "weekly"; readonly monthly_anchor?: number; readonly weekly_anchor?: @@ -11444,16 +11042,16 @@ export interface operations { | "thursday" | "tuesday" | "wednesday"; - } & { readonly [key: string]: any }; + }; readonly statement_descriptor?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance). */ readonly tos_acceptance?: { readonly date?: number; readonly ip?: string; readonly user_agent?: string; - } & { readonly [key: string]: any }; + }; /** 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. */ readonly type?: "custom" | "express" | "standard"; }; @@ -11522,18 +11120,16 @@ export interface operations { /** An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ readonly account_token?: string; /** 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. */ - readonly bank_account?: (Partial< - { - readonly account_holder_name?: string; - readonly account_holder_type?: "company" | "individual"; - readonly account_number: string; - readonly country: string; - readonly currency?: string; - readonly object?: "bank_account"; - readonly routing_number?: string; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly bank_account?: Partial<{ + readonly account_holder_name?: string; + readonly account_holder_type?: "company" | "individual"; + readonly account_number: string; + readonly country: string; + readonly currency?: string; + readonly object?: "bank_account"; + readonly routing_number?: string; + }> & + Partial; /** Business information about the account. */ readonly business_profile?: { readonly mcc?: string; @@ -11543,7 +11139,7 @@ export interface operations { readonly support_phone?: string; readonly support_url?: string; readonly url?: string; - } & { readonly [key: string]: any }; + }; /** The business type. */ readonly business_type?: "company" | "government_entity" | "individual" | "non_profit"; /** Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`. */ @@ -11555,7 +11151,7 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; readonly address_kana?: { readonly city?: string; readonly country?: string; @@ -11564,7 +11160,7 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; readonly address_kanji?: { readonly city?: string; readonly country?: string; @@ -11573,7 +11169,7 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; readonly directors_provided?: boolean; readonly executives_provided?: boolean; readonly name?: string; @@ -11605,9 +11201,9 @@ export interface operations { readonly document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; + }; /** 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). */ readonly default_currency?: string; /** 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. */ @@ -11625,7 +11221,7 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; readonly address_kana?: { readonly city?: string; readonly country?: string; @@ -11634,7 +11230,7 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; readonly address_kanji?: { readonly city?: string; readonly country?: string; @@ -11643,15 +11239,13 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; - readonly dob?: (Partial< - { - readonly day: number; - readonly month: number; - readonly year: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + }; + readonly dob?: Partial<{ + readonly day: number; + readonly month: number; + readonly year: number; + }> & + Partial<"">; readonly email?: string; readonly first_name?: string; readonly first_name_kana?: string; @@ -11662,26 +11256,22 @@ export interface operations { readonly last_name_kana?: string; readonly last_name_kanji?: string; readonly maiden_name?: string; - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; readonly phone?: string; readonly ssn_last_4?: string; readonly verification?: { readonly additional_document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; + }; readonly document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; - /** Set of key-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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; + }; + }; }; + /** Set of key-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`. */ + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** 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. */ readonly requested_capabilities?: readonly ( | "au_becs_debit_payments" @@ -11699,23 +11289,23 @@ export interface operations { readonly logo?: string; readonly primary_color?: string; readonly secondary_color?: string; - } & { readonly [key: string]: any }; + }; readonly card_payments?: { readonly decline_on?: { readonly avs_failure?: boolean; readonly cvc_failure?: boolean; - } & { readonly [key: string]: any }; + }; readonly statement_descriptor_prefix?: string; - } & { readonly [key: string]: any }; + }; readonly payments?: { readonly statement_descriptor?: string; readonly statement_descriptor_kana?: string; readonly statement_descriptor_kanji?: string; - } & { readonly [key: string]: any }; + }; readonly payouts?: { readonly debit_negative_balances?: boolean; readonly schedule?: { - readonly delay_days?: (Partial<"minimum"> & Partial) & { readonly [key: string]: any }; + readonly delay_days?: Partial<"minimum"> & Partial; readonly interval?: "daily" | "manual" | "monthly" | "weekly"; readonly monthly_anchor?: number; readonly weekly_anchor?: @@ -11726,16 +11316,16 @@ export interface operations { | "thursday" | "tuesday" | "wednesday"; - } & { readonly [key: string]: any }; + }; readonly statement_descriptor?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance). */ readonly tos_acceptance?: { readonly date?: number; readonly ip?: string; readonly user_agent?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -11798,18 +11388,16 @@ export interface operations { readonly content: { readonly "application/x-www-form-urlencoded": { /** 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. */ - readonly bank_account?: (Partial< - { - readonly account_holder_name?: string; - readonly account_holder_type?: "company" | "individual"; - readonly account_number: string; - readonly country: string; - readonly currency?: string; - readonly object?: "bank_account"; - readonly routing_number?: string; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly bank_account?: Partial<{ + readonly account_holder_name?: string; + readonly account_holder_type?: "company" | "individual"; + readonly account_number: string; + readonly country: string; + readonly currency?: string; + readonly object?: "bank_account"; + readonly routing_number?: string; + }> & + Partial; /** 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. */ readonly default_for_currency?: boolean; /** Specifies which fields in the response should be expanded. */ @@ -11907,9 +11495,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** Cardholder name. */ readonly name?: string; }; @@ -11967,7 +11553,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -12071,15 +11657,15 @@ export interface operations { readonly content: { readonly "application/json": { /** The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ - readonly data: readonly ((Partial & - Partial) & { readonly [key: string]: any })[]; + readonly data: readonly (Partial & + Partial)[]; /** True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean; /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -12120,18 +11706,16 @@ export interface operations { readonly content: { readonly "application/x-www-form-urlencoded": { /** 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. */ - readonly bank_account?: (Partial< - { - readonly account_holder_name?: string; - readonly account_holder_type?: "company" | "individual"; - readonly account_number: string; - readonly country: string; - readonly currency?: string; - readonly object?: "bank_account"; - readonly routing_number?: string; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly bank_account?: Partial<{ + readonly account_holder_name?: string; + readonly account_holder_type?: "company" | "individual"; + readonly account_number: string; + readonly country: string; + readonly currency?: string; + readonly object?: "bank_account"; + readonly routing_number?: string; + }> & + Partial; /** 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. */ readonly default_for_currency?: boolean; /** Specifies which fields in the response should be expanded. */ @@ -12229,9 +11813,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** Cardholder name. */ readonly name?: string; }; @@ -12355,7 +11937,7 @@ export interface operations { readonly executive?: boolean; readonly owner?: boolean; readonly representative?: boolean; - } & { readonly [key: string]: any }; + }; /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ readonly starting_after?: string; }; @@ -12372,7 +11954,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -12420,7 +12002,7 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; /** The Kana variation of the person's address (Japan only). */ readonly address_kana?: { readonly city?: string; @@ -12430,7 +12012,7 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; /** The Kanji variation of the person's address (Japan only). */ readonly address_kanji?: { readonly city?: string; @@ -12440,16 +12022,14 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; /** The person's date of birth. */ - readonly dob?: (Partial< - { - readonly day: number; - readonly month: number; - readonly year: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly dob?: Partial<{ + readonly day: number; + readonly month: number; + readonly year: number; + }> & + Partial<"">; /** The person's email address. */ readonly email?: string; /** Specifies which fields in the response should be expanded. */ @@ -12473,9 +12053,7 @@ export interface operations { /** The person's maiden name. */ readonly maiden_name?: 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ readonly person_token?: string; /** The person's phone number. */ @@ -12485,10 +12063,10 @@ export interface operations { readonly director?: boolean; readonly executive?: boolean; readonly owner?: boolean; - readonly percent_ownership?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly percent_ownership?: Partial & Partial<"">; readonly representative?: boolean; readonly title?: string; - } & { readonly [key: string]: any }; + }; /** The last 4 digits of the person's social security number. */ readonly ssn_last_4?: string; /** The person's verification status. */ @@ -12496,12 +12074,12 @@ export interface operations { readonly additional_document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; + }; readonly document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; }; }; }; @@ -12571,7 +12149,7 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; /** The Kana variation of the person's address (Japan only). */ readonly address_kana?: { readonly city?: string; @@ -12581,7 +12159,7 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; /** The Kanji variation of the person's address (Japan only). */ readonly address_kanji?: { readonly city?: string; @@ -12591,16 +12169,14 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; /** The person's date of birth. */ - readonly dob?: (Partial< - { - readonly day: number; - readonly month: number; - readonly year: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly dob?: Partial<{ + readonly day: number; + readonly month: number; + readonly year: number; + }> & + Partial<"">; /** The person's email address. */ readonly email?: string; /** Specifies which fields in the response should be expanded. */ @@ -12624,9 +12200,7 @@ export interface operations { /** The person's maiden name. */ readonly maiden_name?: 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ readonly person_token?: string; /** The person's phone number. */ @@ -12636,10 +12210,10 @@ export interface operations { readonly director?: boolean; readonly executive?: boolean; readonly owner?: boolean; - readonly percent_ownership?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly percent_ownership?: Partial & Partial<"">; readonly representative?: boolean; readonly title?: string; - } & { readonly [key: string]: any }; + }; /** The last 4 digits of the person's social security number. */ readonly ssn_last_4?: string; /** The person's verification status. */ @@ -12647,12 +12221,12 @@ export interface operations { readonly additional_document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; + }; readonly document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; }; }; }; @@ -12704,7 +12278,7 @@ export interface operations { readonly executive?: boolean; readonly owner?: boolean; readonly representative?: boolean; - } & { readonly [key: string]: any }; + }; /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ readonly starting_after?: string; }; @@ -12721,7 +12295,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -12769,7 +12343,7 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; /** The Kana variation of the person's address (Japan only). */ readonly address_kana?: { readonly city?: string; @@ -12779,7 +12353,7 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; /** The Kanji variation of the person's address (Japan only). */ readonly address_kanji?: { readonly city?: string; @@ -12789,16 +12363,14 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; /** The person's date of birth. */ - readonly dob?: (Partial< - { - readonly day: number; - readonly month: number; - readonly year: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly dob?: Partial<{ + readonly day: number; + readonly month: number; + readonly year: number; + }> & + Partial<"">; /** The person's email address. */ readonly email?: string; /** Specifies which fields in the response should be expanded. */ @@ -12822,9 +12394,7 @@ export interface operations { /** The person's maiden name. */ readonly maiden_name?: 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ readonly person_token?: string; /** The person's phone number. */ @@ -12834,10 +12404,10 @@ export interface operations { readonly director?: boolean; readonly executive?: boolean; readonly owner?: boolean; - readonly percent_ownership?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly percent_ownership?: Partial & Partial<"">; readonly representative?: boolean; readonly title?: string; - } & { readonly [key: string]: any }; + }; /** The last 4 digits of the person's social security number. */ readonly ssn_last_4?: string; /** The person's verification status. */ @@ -12845,12 +12415,12 @@ export interface operations { readonly additional_document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; + }; readonly document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; }; }; }; @@ -12920,7 +12490,7 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; /** The Kana variation of the person's address (Japan only). */ readonly address_kana?: { readonly city?: string; @@ -12930,7 +12500,7 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; /** The Kanji variation of the person's address (Japan only). */ readonly address_kanji?: { readonly city?: string; @@ -12940,16 +12510,14 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; /** The person's date of birth. */ - readonly dob?: (Partial< - { - readonly day: number; - readonly month: number; - readonly year: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly dob?: Partial<{ + readonly day: number; + readonly month: number; + readonly year: number; + }> & + Partial<"">; /** The person's email address. */ readonly email?: string; /** Specifies which fields in the response should be expanded. */ @@ -12973,9 +12541,7 @@ export interface operations { /** The person's maiden name. */ readonly maiden_name?: 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ readonly person_token?: string; /** The person's phone number. */ @@ -12985,10 +12551,10 @@ export interface operations { readonly director?: boolean; readonly executive?: boolean; readonly owner?: boolean; - readonly percent_ownership?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly percent_ownership?: Partial & Partial<"">; readonly representative?: boolean; readonly title?: string; - } & { readonly [key: string]: any }; + }; /** The last 4 digits of the person's social security number. */ readonly ssn_last_4?: string; /** The person's verification status. */ @@ -12996,12 +12562,12 @@ export interface operations { readonly additional_document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; + }; readonly document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; }; }; }; @@ -13097,7 +12663,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -13202,16 +12768,14 @@ export interface operations { readonly parameters: { readonly query: { /** Only return application fees for the charge specified by this charge ID. */ - readonly charge?: string; - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly charge?: string; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -13234,7 +12798,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -13314,9 +12878,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; }; }; }; @@ -13413,7 +12975,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -13512,24 +13074,20 @@ export interface operations { readonly GetBalanceHistory: { readonly parameters: { readonly query: { - readonly available_on?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly available_on?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** 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). */ readonly 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. */ @@ -13560,7 +13118,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -13619,24 +13177,20 @@ export interface operations { readonly GetBalanceTransactions: { readonly parameters: { readonly query: { - readonly available_on?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly available_on?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** 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). */ readonly 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. */ @@ -13667,7 +13221,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -13779,7 +13333,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -13858,7 +13412,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -13904,7 +13458,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -13924,15 +13478,13 @@ export interface operations { readonly GetCharges: { readonly parameters: { readonly query: { - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** Only return charges for the customer specified by this customer ID. */ readonly 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. */ @@ -13961,7 +13513,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -14004,43 +13556,37 @@ export interface operations { /** 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. */ readonly capture?: boolean; /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ - readonly card?: (Partial< - { - readonly address_city?: string; - readonly address_country?: string; - readonly address_line1?: string; - readonly address_line2?: string; - readonly address_state?: string; - readonly address_zip?: string; - readonly cvc?: string; - readonly exp_month: number; - readonly exp_year: number; - readonly metadata?: { readonly [key: string]: string }; - readonly name?: string; - readonly number: string; - readonly object?: "card"; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly card?: Partial<{ + readonly address_city?: string; + readonly address_country?: string; + readonly address_line1?: string; + readonly address_line2?: string; + readonly address_state?: string; + readonly address_zip?: string; + readonly cvc?: string; + readonly exp_month: number; + readonly exp_year: number; + readonly metadata?: { readonly [key: string]: string }; + readonly name?: string; + readonly number: string; + readonly object?: "card"; + }> & + Partial; /** 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). */ readonly currency?: string; /** The ID of an existing customer that will be charged in this request. */ readonly customer?: string; /** 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. */ readonly description?: string; - readonly destination?: (Partial< - { - readonly account: string; - readonly amount?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly destination?: Partial<{ + readonly account: string; + readonly amount?: number; + }> & + Partial; /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** 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). */ readonly on_behalf_of?: string; /** 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). */ @@ -14054,12 +13600,12 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; readonly carrier?: string; readonly name: string; readonly phone?: string; readonly tracking_number?: string; - } & { readonly [key: string]: any }; + }; /** 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. */ readonly source?: string; /** 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. */ @@ -14070,7 +13616,7 @@ export interface operations { readonly transfer_data?: { readonly amount?: number; readonly destination: string; - } & { readonly [key: string]: any }; + }; /** 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). */ readonly transfer_group?: string; }; @@ -14141,11 +13687,9 @@ export interface operations { /** 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. */ readonly fraud_details?: { readonly user_report: "" | "fraudulent" | "safe"; - } & { readonly [key: string]: any }; - /** Set of key-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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; }; + /** Set of key-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`. */ + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** 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. */ readonly receipt_email?: string; /** Shipping information for the charge. Helps prevent fraud on charges for physical goods. */ @@ -14157,12 +13701,12 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; readonly carrier?: string; readonly name: string; readonly phone?: string; readonly tracking_number?: string; - } & { readonly [key: string]: any }; + }; /** 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. */ readonly transfer_group?: string; }; @@ -14214,7 +13758,7 @@ export interface operations { /** 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. */ readonly transfer_data?: { readonly amount?: number; - } & { readonly [key: string]: any }; + }; /** 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. */ readonly transfer_group?: string; }; @@ -14304,13 +13848,11 @@ export interface operations { readonly shipping_tracking_number?: string; readonly uncategorized_file?: string; readonly uncategorized_text?: string; - } & { readonly [key: string]: any }; + }; /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** 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). */ readonly submit?: boolean; }; @@ -14386,9 +13928,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; readonly payment_intent?: string; readonly reason?: "duplicate" | "fraudulent" | "requested_by_customer"; readonly refund_application_fee?: boolean; @@ -14427,7 +13967,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -14471,9 +14011,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; readonly payment_intent?: string; readonly reason?: "duplicate" | "fraudulent" | "requested_by_customer"; readonly refund_application_fee?: boolean; @@ -14541,9 +14079,7 @@ export interface operations { readonly "application/x-www-form-urlencoded": { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[]; - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; }; }; }; @@ -14578,7 +14114,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -14648,7 +14184,7 @@ export interface operations { * one-time payments or adding invoice line items to a subscription (used * in conjunction with `subscription_data`). */ - readonly line_items?: readonly ({ + readonly line_items?: readonly { readonly amount?: number; readonly currency?: string; readonly description?: string; @@ -14656,7 +14192,7 @@ export interface operations { readonly name?: string; readonly quantity: number; readonly tax_rates?: readonly string[]; - } & { readonly [key: string]: any })[]; + }[]; /** The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. */ readonly locale?: | "auto" @@ -14697,19 +14233,19 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; readonly carrier?: string; readonly name: string; readonly phone?: string; readonly tracking_number?: string; - } & { readonly [key: string]: any }; + }; readonly statement_descriptor?: string; readonly statement_descriptor_suffix?: string; readonly transfer_data?: { readonly amount?: number; readonly destination: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** A list of the types of payment methods (e.g., card) this Checkout session can accept. */ readonly payment_method_types: readonly ("card" | "fpx" | "ideal")[]; /** A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. */ @@ -14717,7 +14253,7 @@ export interface operations { readonly description?: string; readonly metadata?: { readonly [key: string]: string }; readonly on_behalf_of?: string; - } & { readonly [key: string]: any }; + }; /** When set, provides configuration for Checkout to collect a shipping address from a customer. */ readonly shipping_address_collection?: { readonly allowed_countries: readonly ( @@ -14959,7 +14495,7 @@ export interface operations { | "ZW" | "ZZ" )[]; - } & { readonly [key: string]: any }; + }; /** * 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 @@ -14971,16 +14507,16 @@ export interface operations { readonly subscription_data?: { readonly application_fee_percent?: number; readonly default_tax_rates?: readonly string[]; - readonly items?: readonly ({ + readonly items?: readonly { readonly plan: string; readonly quantity?: number; readonly tax_rates?: readonly string[]; - } & { readonly [key: string]: any })[]; + }[]; readonly metadata?: { readonly [key: string]: string }; readonly trial_end?: number; readonly trial_from_plan?: boolean; readonly trial_period_days?: number; - } & { readonly [key: string]: any }; + }; /** * The URL to which Stripe should send customers when payment or setup * is complete. @@ -15050,7 +14586,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -15102,15 +14638,13 @@ export interface operations { readonly parameters: { readonly 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. */ - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -15133,7 +14667,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -15187,9 +14721,7 @@ export interface operations { /** 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. */ readonly max_redemptions?: number; /** Set of key-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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. */ readonly name?: string; /** 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). */ @@ -15258,9 +14790,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. */ readonly name?: string; }; @@ -15324,7 +14854,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -15383,16 +14913,16 @@ export interface operations { /** ID of the invoice. */ readonly invoice: string; /** Line items that make up the credit note. */ - readonly lines?: readonly ({ + readonly lines?: readonly { readonly amount?: number; readonly description?: string; readonly invoice_line_item?: string; readonly quantity?: number; - readonly tax_rates?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly tax_rates?: Partial & Partial<"">; readonly type: "custom_line_item" | "invoice_line_item"; readonly unit_amount?: number; readonly unit_amount_decimal?: string; - } & { readonly [key: string]: any })[]; + }[]; /** The credit note's memo appears on the credit note PDF. */ readonly 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`. */ @@ -15422,16 +14952,16 @@ export interface operations { /** ID of the invoice. */ readonly invoice: string; /** Line items that make up the credit note. */ - readonly lines?: readonly ({ + readonly lines?: readonly { readonly amount?: number; readonly description?: string; readonly invoice_line_item?: string; readonly quantity?: number; - readonly tax_rates?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly tax_rates?: Partial & Partial<"">; readonly type: "custom_line_item" | "invoice_line_item"; readonly unit_amount?: number; readonly unit_amount_decimal?: string; - } & { readonly [key: string]: any })[]; + }[]; /** The credit note's memo appears on the credit note PDF. */ readonly 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`. */ @@ -15483,16 +15013,16 @@ export interface operations { /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ readonly limit?: number; /** Line items that make up the credit note. */ - readonly lines?: readonly ({ + readonly lines?: readonly { readonly amount?: number; readonly description?: string; readonly invoice_line_item?: string; readonly quantity?: number; - readonly tax_rates?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly tax_rates?: Partial & Partial<"">; readonly type: "custom_line_item" | "invoice_line_item"; readonly unit_amount?: number; readonly unit_amount_decimal?: string; - } & { readonly [key: string]: any })[]; + }[]; /** The credit note's memo appears on the credit note PDF. */ readonly 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`. */ @@ -15522,7 +15052,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -15568,7 +15098,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -15683,15 +15213,13 @@ export interface operations { readonly GetCustomers: { readonly parameters: { readonly query: { - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** A filter on the list based on the customer's `email` field. The value must be a string. */ readonly 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. */ @@ -15716,7 +15244,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -15752,17 +15280,15 @@ export interface operations { readonly content: { readonly "application/x-www-form-urlencoded": { /** The customer's address. */ - readonly address?: (Partial< - { - readonly city?: string; - readonly country?: string; - readonly line1: string; - readonly line2?: string; - readonly postal_code?: string; - readonly state?: string; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly address?: Partial<{ + readonly city?: string; + readonly country?: string; + readonly line1: string; + readonly line2?: string; + readonly postal_code?: string; + readonly state?: string; + }> & + Partial<"">; /** 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. */ readonly balance?: number; readonly coupon?: string; @@ -15776,20 +15302,18 @@ export interface operations { readonly invoice_prefix?: string; /** Default invoice settings for this customer. */ readonly invoice_settings?: { - readonly custom_fields?: (Partial< - readonly ({ + readonly custom_fields?: Partial< + readonly { readonly name: string; readonly value: string; - } & { readonly [key: string]: any })[] + }[] > & - Partial<"">) & { readonly [key: string]: any }; + Partial<"">; readonly default_payment_method?: string; readonly footer?: string; - } & { readonly [key: string]: any }; - /** Set of key-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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; }; + /** Set of key-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`. */ + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** The customer's full name or business name. */ readonly name?: string; /** The sequence to be used on the customer's next invoice. Defaults to 1. */ @@ -15800,26 +15324,24 @@ export interface operations { /** Customer's preferred languages, ordered by preference. */ readonly preferred_locales?: readonly string[]; /** The customer's shipping information. Appears on invoices emailed to this customer. */ - readonly shipping?: (Partial< - { - readonly address: { - readonly city?: string; - readonly country?: string; - readonly line1: string; - readonly line2?: string; - readonly postal_code?: string; - readonly state?: string; - } & { readonly [key: string]: any }; - readonly name: string; - readonly phone?: string; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly shipping?: Partial<{ + readonly address: { + readonly city?: string; + readonly country?: string; + readonly line1: string; + readonly line2?: string; + readonly postal_code?: string; + readonly state?: string; + }; + readonly name: string; + readonly phone?: string; + }> & + Partial<"">; readonly source?: string; /** The customer's tax exemption. One of `none`, `exempt`, or `reverse`. */ readonly tax_exempt?: "" | "exempt" | "none" | "reverse"; /** The customer's tax IDs. */ - readonly tax_id_data?: readonly ({ + readonly tax_id_data?: readonly { readonly type: | "au_abn" | "ca_bn" @@ -15845,7 +15367,7 @@ export interface operations { | "us_ein" | "za_vat"; readonly value: string; - } & { readonly [key: string]: any })[]; + }[]; }; }; }; @@ -15865,8 +15387,8 @@ export interface operations { /** Successful response. */ readonly 200: { readonly content: { - readonly "application/json": (Partial & - Partial) & { readonly [key: string]: any }; + readonly "application/json": Partial & + Partial; }; }; /** Error response. */ @@ -15911,51 +15433,45 @@ export interface operations { readonly content: { readonly "application/x-www-form-urlencoded": { /** The customer's address. */ - readonly address?: (Partial< - { - readonly city?: string; - readonly country?: string; - readonly line1: string; - readonly line2?: string; - readonly postal_code?: string; - readonly state?: string; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly address?: Partial<{ + readonly city?: string; + readonly country?: string; + readonly line1: string; + readonly line2?: string; + readonly postal_code?: string; + readonly state?: string; + }> & + Partial<"">; /** 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. */ readonly balance?: number; /** 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. */ - readonly bank_account?: (Partial< - { - readonly account_holder_name?: string; - readonly account_holder_type?: "company" | "individual"; - readonly account_number: string; - readonly country: string; - readonly currency?: string; - readonly object?: "bank_account"; - readonly routing_number?: string; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly bank_account?: Partial<{ + readonly account_holder_name?: string; + readonly account_holder_type?: "company" | "individual"; + readonly account_number: string; + readonly country: string; + readonly currency?: string; + readonly object?: "bank_account"; + readonly routing_number?: string; + }> & + Partial; /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ - readonly card?: (Partial< - { - readonly address_city?: string; - readonly address_country?: string; - readonly address_line1?: string; - readonly address_line2?: string; - readonly address_state?: string; - readonly address_zip?: string; - readonly cvc?: string; - readonly exp_month: number; - readonly exp_year: number; - readonly metadata?: { readonly [key: string]: string }; - readonly name?: string; - readonly number: string; - readonly object?: "card"; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly card?: Partial<{ + readonly address_city?: string; + readonly address_country?: string; + readonly address_line1?: string; + readonly address_line2?: string; + readonly address_state?: string; + readonly address_zip?: string; + readonly cvc?: string; + readonly exp_month: number; + readonly exp_year: number; + readonly metadata?: { readonly [key: string]: string }; + readonly name?: string; + readonly number: string; + readonly object?: "card"; + }> & + Partial; readonly coupon?: string; /** ID of Alipay account to make the customer's new default for invoice payments. */ readonly default_alipay_account?: string; @@ -15981,20 +15497,18 @@ export interface operations { readonly invoice_prefix?: string; /** Default invoice settings for this customer. */ readonly invoice_settings?: { - readonly custom_fields?: (Partial< - readonly ({ + readonly custom_fields?: Partial< + readonly { readonly name: string; readonly value: string; - } & { readonly [key: string]: any })[] + }[] > & - Partial<"">) & { readonly [key: string]: any }; + Partial<"">; readonly default_payment_method?: string; readonly footer?: string; - } & { readonly [key: string]: any }; - /** Set of key-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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; }; + /** Set of key-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`. */ + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** The customer's full name or business name. */ readonly name?: string; /** The sequence to be used on the customer's next invoice. Defaults to 1. */ @@ -16004,26 +15518,24 @@ export interface operations { /** Customer's preferred languages, ordered by preference. */ readonly preferred_locales?: readonly string[]; /** The customer's shipping information. Appears on invoices emailed to this customer. */ - readonly shipping?: (Partial< - { - readonly address: { - readonly city?: string; - readonly country?: string; - readonly line1: string; - readonly line2?: string; - readonly postal_code?: string; - readonly state?: string; - } & { readonly [key: string]: any }; - readonly name: string; - readonly phone?: string; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly shipping?: Partial<{ + readonly address: { + readonly city?: string; + readonly country?: string; + readonly line1: string; + readonly line2?: string; + readonly postal_code?: string; + readonly state?: string; + }; + readonly name: string; + readonly phone?: string; + }> & + Partial<"">; readonly source?: string; /** The customer's tax exemption. One of `none`, `exempt`, or `reverse`. */ readonly tax_exempt?: "" | "exempt" | "none" | "reverse"; /** 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`. */ - readonly trial_end?: (Partial<"now"> & Partial) & { readonly [key: string]: any }; + readonly trial_end?: Partial<"now"> & Partial; }; }; }; @@ -16085,7 +15597,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -16134,9 +15646,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; }; }; }; @@ -16203,9 +15713,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; }; }; }; @@ -16240,7 +15748,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -16289,37 +15797,33 @@ export interface operations { /** A token returned by [Stripe.js](https://stripe.com/docs/stripe.js) representing the user’s Alipay account details. */ readonly alipay_account?: string; /** 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. */ - readonly bank_account?: (Partial< - { - readonly account_holder_name?: string; - readonly account_holder_type?: "company" | "individual"; - readonly account_number: string; - readonly country: string; - readonly currency?: string; - readonly object?: "bank_account"; - readonly routing_number?: string; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly bank_account?: Partial<{ + readonly account_holder_name?: string; + readonly account_holder_type?: "company" | "individual"; + readonly account_number: string; + readonly country: string; + readonly currency?: string; + readonly object?: "bank_account"; + readonly routing_number?: string; + }> & + Partial; /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ - readonly card?: (Partial< - { - readonly address_city?: string; - readonly address_country?: string; - readonly address_line1?: string; - readonly address_line2?: string; - readonly address_state?: string; - readonly address_zip?: string; - readonly cvc?: string; - readonly exp_month: number; - readonly exp_year: number; - readonly metadata?: { readonly [key: string]: string }; - readonly name?: string; - readonly number: string; - readonly object?: "card"; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly card?: Partial<{ + readonly address_city?: string; + readonly address_country?: string; + readonly address_line1?: string; + readonly address_line2?: string; + readonly address_state?: string; + readonly address_zip?: string; + readonly cvc?: string; + readonly exp_month: number; + readonly exp_year: number; + readonly metadata?: { readonly [key: string]: string }; + readonly name?: string; + readonly number: string; + readonly object?: "card"; + }> & + Partial; /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ @@ -16374,9 +15878,9 @@ export interface operations { /** Successful response. */ readonly 200: { readonly content: { - readonly "application/json": (Partial & + readonly "application/json": Partial & Partial & - Partial) & { readonly [key: string]: any }; + Partial; }; }; /** Error response. */ @@ -16412,9 +15916,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** Cardholder name. */ readonly name?: string; readonly owner?: { @@ -16425,11 +15927,11 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; readonly email?: string; readonly name?: string; readonly phone?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -16446,8 +15948,8 @@ export interface operations { /** Successful response. */ readonly 200: { readonly content: { - readonly "application/json": (Partial & - Partial) & { readonly [key: string]: any }; + readonly "application/json": Partial & + Partial; }; }; /** Error response. */ @@ -16532,7 +16034,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -16581,37 +16083,33 @@ export interface operations { /** A token returned by [Stripe.js](https://stripe.com/docs/stripe.js) representing the user’s Alipay account details. */ readonly alipay_account?: string; /** 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. */ - readonly bank_account?: (Partial< - { - readonly account_holder_name?: string; - readonly account_holder_type?: "company" | "individual"; - readonly account_number: string; - readonly country: string; - readonly currency?: string; - readonly object?: "bank_account"; - readonly routing_number?: string; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly bank_account?: Partial<{ + readonly account_holder_name?: string; + readonly account_holder_type?: "company" | "individual"; + readonly account_number: string; + readonly country: string; + readonly currency?: string; + readonly object?: "bank_account"; + readonly routing_number?: string; + }> & + Partial; /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ - readonly card?: (Partial< - { - readonly address_city?: string; - readonly address_country?: string; - readonly address_line1?: string; - readonly address_line2?: string; - readonly address_state?: string; - readonly address_zip?: string; - readonly cvc?: string; - readonly exp_month: number; - readonly exp_year: number; - readonly metadata?: { readonly [key: string]: string }; - readonly name?: string; - readonly number: string; - readonly object?: "card"; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly card?: Partial<{ + readonly address_city?: string; + readonly address_country?: string; + readonly address_line1?: string; + readonly address_line2?: string; + readonly address_state?: string; + readonly address_zip?: string; + readonly cvc?: string; + readonly exp_month: number; + readonly exp_year: number; + readonly metadata?: { readonly [key: string]: string }; + readonly name?: string; + readonly number: string; + readonly object?: "card"; + }> & + Partial; /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ @@ -16666,9 +16164,9 @@ export interface operations { /** Successful response. */ readonly 200: { readonly content: { - readonly "application/json": (Partial & + readonly "application/json": Partial & Partial & - Partial) & { readonly [key: string]: any }; + Partial; }; }; /** Error response. */ @@ -16704,9 +16202,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** Cardholder name. */ readonly name?: string; readonly owner?: { @@ -16717,11 +16213,11 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; readonly email?: string; readonly name?: string; readonly phone?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -16738,8 +16234,8 @@ export interface operations { /** Successful response. */ readonly 200: { readonly content: { - readonly "application/json": (Partial & - Partial) & { readonly [key: string]: any }; + readonly "application/json": Partial & + Partial; }; }; /** Error response. */ @@ -16840,18 +16336,18 @@ export interface operations { readonly content: { readonly "application/json": { /** Details about each object. */ - readonly data: readonly ((Partial & + readonly data: readonly (Partial & Partial & Partial & Partial & - Partial) & { readonly [key: string]: any })[]; + Partial)[]; /** True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean; /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -16900,37 +16396,33 @@ export interface operations { /** A token returned by [Stripe.js](https://stripe.com/docs/stripe.js) representing the user’s Alipay account details. */ readonly alipay_account?: string; /** 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. */ - readonly bank_account?: (Partial< - { - readonly account_holder_name?: string; - readonly account_holder_type?: "company" | "individual"; - readonly account_number: string; - readonly country: string; - readonly currency?: string; - readonly object?: "bank_account"; - readonly routing_number?: string; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly bank_account?: Partial<{ + readonly account_holder_name?: string; + readonly account_holder_type?: "company" | "individual"; + readonly account_number: string; + readonly country: string; + readonly currency?: string; + readonly object?: "bank_account"; + readonly routing_number?: string; + }> & + Partial; /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ - readonly card?: (Partial< - { - readonly address_city?: string; - readonly address_country?: string; - readonly address_line1?: string; - readonly address_line2?: string; - readonly address_state?: string; - readonly address_zip?: string; - readonly cvc?: string; - readonly exp_month: number; - readonly exp_year: number; - readonly metadata?: { readonly [key: string]: string }; - readonly name?: string; - readonly number: string; - readonly object?: "card"; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly card?: Partial<{ + readonly address_city?: string; + readonly address_country?: string; + readonly address_line1?: string; + readonly address_line2?: string; + readonly address_state?: string; + readonly address_zip?: string; + readonly cvc?: string; + readonly exp_month: number; + readonly exp_year: number; + readonly metadata?: { readonly [key: string]: string }; + readonly name?: string; + readonly number: string; + readonly object?: "card"; + }> & + Partial; /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ @@ -16985,9 +16477,9 @@ export interface operations { /** Successful response. */ readonly 200: { readonly content: { - readonly "application/json": (Partial & + readonly "application/json": Partial & Partial & - Partial) & { readonly [key: string]: any }; + Partial; }; }; /** Error response. */ @@ -17023,9 +16515,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** Cardholder name. */ readonly name?: string; readonly owner?: { @@ -17036,11 +16526,11 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; readonly email?: string; readonly name?: string; readonly phone?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -17057,8 +16547,8 @@ export interface operations { /** Successful response. */ readonly 200: { readonly content: { - readonly "application/json": (Partial & - Partial) & { readonly [key: string]: any }; + readonly "application/json": Partial & + Partial; }; }; /** Error response. */ @@ -17140,7 +16630,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -17187,13 +16677,11 @@ export interface operations { /** 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. */ readonly billing_cycle_anchor?: number; /** 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. */ - readonly billing_thresholds?: (Partial< - { - readonly amount_gte?: number; - readonly reset_billing_cycle_anchor?: boolean; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly billing_thresholds?: Partial<{ + readonly amount_gte?: number; + readonly reset_billing_cycle_anchor?: boolean; + }> & + Partial<"">; /** 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. */ readonly cancel_at?: number; /** Boolean indicating whether this subscription should cancel at the end of the current period. */ @@ -17209,26 +16697,22 @@ export interface operations { /** 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. */ readonly default_source?: string; /** 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. */ - readonly default_tax_rates?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly default_tax_rates?: Partial & Partial<"">; /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[]; /** A list of up to 20 subscription items, each with an attached plan. */ - readonly items?: readonly ({ - readonly billing_thresholds?: (Partial< - { - readonly usage_gte: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly items?: readonly { + readonly billing_thresholds?: Partial<{ + readonly usage_gte: number; + }> & + Partial<"">; readonly metadata?: { readonly [key: string]: string }; readonly plan?: string; readonly quantity?: number; - readonly tax_rates?: (Partial & Partial<"">) & { readonly [key: string]: any }; - } & { readonly [key: string]: any })[]; + readonly tax_rates?: Partial & Partial<"">; + }[]; /** Set of key-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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ readonly off_session?: boolean; /** @@ -17240,13 +16724,11 @@ export interface operations { */ readonly payment_behavior?: "allow_incomplete" | "error_if_incomplete" | "pending_if_incomplete"; /** 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. */ - readonly pending_invoice_item_interval?: (Partial< - { - readonly interval: "day" | "month" | "week" | "year"; - readonly interval_count?: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly pending_invoice_item_interval?: Partial<{ + readonly interval: "day" | "month" | "week" | "year"; + readonly interval_count?: number; + }> & + Partial<"">; /** 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`. */ readonly prorate?: boolean; /** @@ -17256,9 +16738,9 @@ export interface operations { */ readonly proration_behavior?: "always_invoice" | "create_prorations" | "none"; /** 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`. */ - readonly tax_percent?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly tax_percent?: Partial & Partial<"">; /** 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`. */ - readonly trial_end?: (Partial<"now"> & Partial) & { readonly [key: string]: any }; + readonly trial_end?: Partial<"now"> & Partial; /** 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. */ readonly trial_from_plan?: boolean; /** 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. */ @@ -17329,15 +16811,13 @@ export interface operations { /** 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). */ readonly billing_cycle_anchor?: "now" | "unchanged"; /** 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. */ - readonly billing_thresholds?: (Partial< - { - readonly amount_gte?: number; - readonly reset_billing_cycle_anchor?: boolean; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly billing_thresholds?: Partial<{ + readonly amount_gte?: number; + readonly reset_billing_cycle_anchor?: boolean; + }> & + Partial<"">; /** 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. */ - readonly cancel_at?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly cancel_at?: Partial & Partial<"">; /** Boolean indicating whether this subscription should cancel at the end of the current period. */ readonly cancel_at_period_end?: boolean; /** 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`. */ @@ -17351,41 +16831,33 @@ export interface operations { /** 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. */ readonly default_source?: string; /** 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. */ - readonly default_tax_rates?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly default_tax_rates?: Partial & Partial<"">; /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[]; /** List of subscription items, each with an attached plan. */ - readonly items?: readonly ({ - readonly billing_thresholds?: (Partial< - { - readonly usage_gte: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly items?: readonly { + readonly billing_thresholds?: Partial<{ + readonly usage_gte: number; + }> & + Partial<"">; readonly clear_usage?: boolean; readonly deleted?: boolean; readonly id?: string; - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; readonly plan?: string; readonly quantity?: number; - readonly tax_rates?: (Partial & Partial<"">) & { readonly [key: string]: any }; - } & { readonly [key: string]: any })[]; + readonly tax_rates?: Partial & Partial<"">; + }[]; /** Set of key-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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ readonly off_session?: boolean; /** If specified, payment collection for this subscription will be paused. */ - readonly pause_collection?: (Partial< - { - readonly behavior: "keep_as_draft" | "mark_uncollectible" | "void"; - readonly resumes_at?: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly pause_collection?: Partial<{ + readonly behavior: "keep_as_draft" | "mark_uncollectible" | "void"; + readonly resumes_at?: number; + }> & + Partial<"">; /** * 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. * @@ -17395,13 +16867,11 @@ export interface operations { */ readonly payment_behavior?: "allow_incomplete" | "error_if_incomplete" | "pending_if_incomplete"; /** 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. */ - readonly pending_invoice_item_interval?: (Partial< - { - readonly interval: "day" | "month" | "week" | "year"; - readonly interval_count?: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly pending_invoice_item_interval?: Partial<{ + readonly interval: "day" | "month" | "week" | "year"; + readonly interval_count?: number; + }> & + Partial<"">; /** 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`. */ readonly prorate?: boolean; /** @@ -17415,9 +16885,9 @@ export interface operations { /** 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. */ readonly proration_date?: number; /** 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`. */ - readonly tax_percent?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly tax_percent?: Partial & Partial<"">; /** 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`. */ - readonly trial_end?: (Partial<"now"> & Partial) & { readonly [key: string]: any }; + readonly trial_end?: Partial<"now"> & Partial; /** 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. */ readonly trial_from_plan?: boolean; }; @@ -17554,7 +17024,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -17693,15 +17163,13 @@ export interface operations { readonly query: { /** Only return disputes associated to the charge specified by this charge ID. */ readonly charge?: string; - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -17726,7 +17194,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -17830,13 +17298,11 @@ export interface operations { readonly shipping_tracking_number?: string; readonly uncategorized_file?: string; readonly uncategorized_text?: string; - } & { readonly [key: string]: any }; + }; /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** 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). */ readonly submit?: boolean; }; @@ -17940,15 +17406,13 @@ export interface operations { readonly GetEvents: { readonly parameters: { readonly query: { - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** 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. */ readonly 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. */ @@ -17977,7 +17441,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -18050,7 +17514,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -18101,15 +17565,13 @@ export interface operations { readonly GetFileLinks: { readonly parameters: { readonly query: { - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -18136,7 +17598,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -18178,9 +17640,7 @@ export interface operations { /** 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`. */ readonly file: 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; }; }; }; @@ -18243,11 +17703,9 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[]; /** A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. */ - readonly expires_at?: (Partial<"now"> & Partial & Partial<"">) & { readonly [key: string]: any }; + readonly expires_at?: Partial<"now"> & Partial & Partial<"">; /** Set of key-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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; }; }; }; @@ -18255,16 +17713,14 @@ export interface operations { /**

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.

*/ readonly GetFiles: { readonly parameters: { - readonly query: { - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly query: { + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -18299,7 +17755,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -18346,10 +17802,8 @@ export interface operations { readonly file_link_data?: { readonly create: boolean; readonly expires_at?: number; - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; - } & { readonly [key: string]: any }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; + }; /** 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`. */ readonly purpose: | "additional_verification" @@ -18399,15 +17853,13 @@ export interface operations { readonly GetInvoiceitems: { readonly parameters: { readonly query: { - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. */ readonly 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. */ @@ -18436,7 +17888,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -18486,14 +17938,12 @@ export interface operations { /** 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. */ readonly invoice?: 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** The period associated with this invoice item. */ readonly period?: { readonly end: number; readonly start: number; - } & { readonly [key: string]: any }; + }; /** Non-negative integer. The quantity of units for the invoice item. */ readonly quantity?: number; /** 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. */ @@ -18572,18 +18022,16 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** The period associated with this invoice item. */ readonly period?: { readonly end: number; readonly start: number; - } & { readonly [key: string]: any }; + }; /** Non-negative integer. The quantity of units for the invoice item. */ readonly quantity?: number; /** 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. */ - readonly tax_rates?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly tax_rates?: Partial & Partial<"">; /** 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. */ readonly unit_amount?: number; /** 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. */ @@ -18625,26 +18073,22 @@ export interface operations { readonly query: { /** The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`. */ readonly collection_method?: "charge_automatically" | "send_invoice"; - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** Only return invoices for the customer specified by this customer ID. */ readonly customer?: string; - readonly due_date?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly due_date?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -18671,7 +18115,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -18713,13 +18157,13 @@ export interface operations { /** 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`. */ readonly collection_method?: "charge_automatically" | "send_invoice"; /** A list of up to 4 custom fields to be displayed on the invoice. */ - readonly custom_fields?: (Partial< - readonly ({ + readonly custom_fields?: Partial< + readonly { readonly name: string; readonly value: string; - } & { readonly [key: string]: any })[] + }[] > & - Partial<"">) & { readonly [key: string]: any }; + Partial<"">; /** The ID of the customer who will be billed. */ readonly customer: string; /** The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`. */ @@ -18739,9 +18183,7 @@ export interface operations { /** Footer to be displayed on the invoice. */ readonly footer?: 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** 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`. */ readonly statement_descriptor?: string; /** 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. */ @@ -18769,60 +18211,50 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[]; /** List of invoice items to add or update in the upcoming invoice preview. */ - readonly invoice_items?: readonly ({ + readonly invoice_items?: readonly { readonly amount?: number; readonly currency?: string; readonly description?: string; readonly discountable?: boolean; readonly invoiceitem?: string; - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; readonly period?: { readonly end: number; readonly start: number; - } & { readonly [key: string]: any }; + }; readonly quantity?: number; - readonly tax_rates?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly tax_rates?: Partial & Partial<"">; readonly unit_amount?: number; readonly unit_amount_decimal?: string; - } & { readonly [key: string]: any })[]; + }[]; /** The identifier of the unstarted schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. */ readonly 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. */ readonly 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`. */ - readonly subscription_billing_cycle_anchor?: (Partial<"now" | "unchanged"> & Partial) & { - readonly [key: string]: any; - }; + readonly subscription_billing_cycle_anchor?: Partial<"now" | "unchanged"> & Partial; /** 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`.` */ - readonly subscription_cancel_at?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly subscription_cancel_at?: Partial & Partial<"">; /** Boolean indicating whether this subscription should cancel at the end of the current period. */ readonly subscription_cancel_at_period_end?: boolean; /** This simulates the subscription being canceled or expired immediately. */ readonly 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. */ - readonly subscription_default_tax_rates?: (Partial & Partial<"">) & { - readonly [key: string]: any; - }; + readonly subscription_default_tax_rates?: Partial & Partial<"">; /** List of subscription items, each with an attached plan. */ - readonly subscription_items?: readonly ({ - readonly billing_thresholds?: (Partial< - { - readonly usage_gte: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly subscription_items?: readonly { + readonly billing_thresholds?: Partial<{ + readonly usage_gte: number; + }> & + Partial<"">; readonly clear_usage?: boolean; readonly deleted?: boolean; readonly id?: string; - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; readonly plan?: string; readonly quantity?: number; - readonly tax_rates?: (Partial & Partial<"">) & { readonly [key: string]: any }; - } & { readonly [key: string]: any })[]; + readonly tax_rates?: Partial & Partial<"">; + }[]; /** 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. */ readonly subscription_prorate?: boolean; /** @@ -18840,7 +18272,7 @@ export interface operations { /** 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`. */ readonly 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. */ - readonly subscription_trial_end?: (Partial<"now"> & Partial) & { readonly [key: string]: any }; + readonly subscription_trial_end?: Partial<"now"> & Partial; /** 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. */ readonly subscription_trial_from_plan?: boolean; }; @@ -18878,24 +18310,22 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[]; /** List of invoice items to add or update in the upcoming invoice preview. */ - readonly invoice_items?: readonly ({ + readonly invoice_items?: readonly { readonly amount?: number; readonly currency?: string; readonly description?: string; readonly discountable?: boolean; readonly invoiceitem?: string; - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; readonly period?: { readonly end: number; readonly start: number; - } & { readonly [key: string]: any }; + }; readonly quantity?: number; - readonly tax_rates?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly tax_rates?: Partial & Partial<"">; readonly unit_amount?: number; readonly unit_amount_decimal?: string; - } & { readonly [key: string]: any })[]; + }[]; /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ readonly limit?: number; /** The identifier of the unstarted schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. */ @@ -18905,37 +18335,29 @@ export interface operations { /** 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. */ readonly 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`. */ - readonly subscription_billing_cycle_anchor?: (Partial<"now" | "unchanged"> & Partial) & { - readonly [key: string]: any; - }; + readonly subscription_billing_cycle_anchor?: Partial<"now" | "unchanged"> & Partial; /** 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`.` */ - readonly subscription_cancel_at?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly subscription_cancel_at?: Partial & Partial<"">; /** Boolean indicating whether this subscription should cancel at the end of the current period. */ readonly subscription_cancel_at_period_end?: boolean; /** This simulates the subscription being canceled or expired immediately. */ readonly 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. */ - readonly subscription_default_tax_rates?: (Partial & Partial<"">) & { - readonly [key: string]: any; - }; + readonly subscription_default_tax_rates?: Partial & Partial<"">; /** List of subscription items, each with an attached plan. */ - readonly subscription_items?: readonly ({ - readonly billing_thresholds?: (Partial< - { - readonly usage_gte: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly subscription_items?: readonly { + readonly billing_thresholds?: Partial<{ + readonly usage_gte: number; + }> & + Partial<"">; readonly clear_usage?: boolean; readonly deleted?: boolean; readonly id?: string; - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; readonly plan?: string; readonly quantity?: number; - readonly tax_rates?: (Partial & Partial<"">) & { readonly [key: string]: any }; - } & { readonly [key: string]: any })[]; + readonly tax_rates?: Partial & Partial<"">; + }[]; /** 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. */ readonly subscription_prorate?: boolean; /** @@ -18953,7 +18375,7 @@ export interface operations { /** 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`. */ readonly 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. */ - readonly subscription_trial_end?: (Partial<"now"> & Partial) & { readonly [key: string]: any }; + readonly subscription_trial_end?: Partial<"now"> & Partial; /** 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. */ readonly subscription_trial_from_plan?: boolean; }; @@ -18971,7 +18393,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -19056,13 +18478,13 @@ export interface operations { /** Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices. */ readonly collection_method?: "charge_automatically" | "send_invoice"; /** 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. */ - readonly custom_fields?: (Partial< - readonly ({ + readonly custom_fields?: Partial< + readonly { readonly name: string; readonly value: string; - } & { readonly [key: string]: any })[] + }[] > & - Partial<"">) & { readonly [key: string]: any }; + Partial<"">; /** 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. */ readonly days_until_due?: number; /** 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. */ @@ -19070,7 +18492,7 @@ export interface operations { /** 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. */ readonly default_source?: string; /** 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. */ - readonly default_tax_rates?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly default_tax_rates?: Partial & Partial<"">; /** An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ readonly description?: string; /** 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. */ @@ -19080,13 +18502,11 @@ export interface operations { /** Footer to be displayed on the invoice. */ readonly footer?: 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** 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`. */ readonly statement_descriptor?: string; /** 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`. */ - readonly tax_percent?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly tax_percent?: Partial & Partial<"">; }; }; }; @@ -19180,7 +18600,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -19362,7 +18782,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -19422,15 +18842,13 @@ export interface operations { /** Only return authorizations belonging to the given cardholder. */ readonly cardholder?: string; /** Only return authorizations that were created during the given date interval. */ - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -19455,7 +18873,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -19529,9 +18947,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; }; }; }; @@ -19565,9 +18981,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; }; }; }; @@ -19599,9 +19013,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; }; }; }; @@ -19611,15 +19023,13 @@ export interface operations { readonly parameters: { readonly query: { /** Only return cardholders that were created during the given date interval. */ - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** Only return cardholders that have the given email address. */ readonly 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. */ @@ -19650,7 +19060,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -19694,12 +19104,12 @@ export interface operations { readonly line2?: string; readonly postal_code: string; readonly state?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** Additional information about a `company` cardholder. */ readonly company?: { readonly tax_id?: string; - } & { readonly [key: string]: any }; + }; /** The cardholder's email address. */ readonly email?: string; /** Specifies which fields in the response should be expanded. */ @@ -19710,16 +19120,16 @@ export interface operations { readonly day: number; readonly month: number; readonly year: number; - } & { readonly [key: string]: any }; + }; readonly first_name: string; readonly last_name: string; readonly verification?: { readonly document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; + }; /** Set of key-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`. */ readonly metadata?: { readonly [key: string]: string }; /** The cardholder's name. This will be printed on cards issued to them. */ @@ -20308,7 +19718,7 @@ export interface operations { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[]; - readonly spending_limits?: readonly ({ + readonly spending_limits?: readonly { readonly amount: number; readonly categories?: readonly ( | "ac_refrigeration_repair" @@ -20601,9 +20011,9 @@ export interface operations { | "wrecking_and_salvage_yards" )[]; readonly interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; - } & { readonly [key: string]: any })[]; + }[]; readonly spending_limits_currency?: string; - } & { readonly [key: string]: any }; + }; /** Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`. */ readonly status?: "active" | "inactive"; /** One of `individual` or `company`. */ @@ -20676,12 +20086,12 @@ export interface operations { readonly line2?: string; readonly postal_code: string; readonly state?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** Additional information about a `company` cardholder. */ readonly company?: { readonly tax_id?: string; - } & { readonly [key: string]: any }; + }; /** The cardholder's email address. */ readonly email?: string; /** Specifies which fields in the response should be expanded. */ @@ -20692,16 +20102,16 @@ export interface operations { readonly day: number; readonly month: number; readonly year: number; - } & { readonly [key: string]: any }; + }; readonly first_name: string; readonly last_name: string; readonly verification?: { readonly document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; + }; /** Set of key-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`. */ readonly metadata?: { readonly [key: string]: string }; /** The cardholder's phone number. */ @@ -21288,7 +20698,7 @@ export interface operations { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[]; - readonly spending_limits?: readonly ({ + readonly spending_limits?: readonly { readonly amount: number; readonly categories?: readonly ( | "ac_refrigeration_repair" @@ -21581,9 +20991,9 @@ export interface operations { | "wrecking_and_salvage_yards" )[]; readonly interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; - } & { readonly [key: string]: any })[]; + }[]; readonly spending_limits_currency?: string; - } & { readonly [key: string]: any }; + }; /** Specifies whether to permit authorizations on this cardholder's cards. */ readonly status?: "active" | "inactive"; }; @@ -21597,15 +21007,13 @@ export interface operations { /** Only return cards belonging to the Cardholder with the provided ID. */ readonly cardholder?: string; /** Only return cards that were issued during the given date interval. */ - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string; /** Only return cards that have the given expiration month. */ @@ -21638,7 +21046,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -21694,11 +21102,11 @@ export interface operations { readonly line2?: string; readonly postal_code: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; readonly name: string; readonly service?: "express" | "priority" | "standard"; readonly type?: "bulk" | "individual"; - } & { readonly [key: string]: any }; + }; /** 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. */ readonly spending_controls?: { readonly allowed_categories?: readonly ( @@ -22281,7 +21689,7 @@ export interface operations { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[]; - readonly spending_limits?: readonly ({ + readonly spending_limits?: readonly { readonly amount: number; readonly categories?: readonly ( | "ac_refrigeration_repair" @@ -22574,8 +21982,8 @@ export interface operations { | "wrecking_and_salvage_yards" )[]; readonly interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; /** Whether authorizations can be approved on this card. Defaults to `inactive`. */ readonly status?: "active" | "inactive"; /** The type of card to issue. Possible values are `physical` or `virtual`. */ @@ -22644,9 +22052,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** 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. */ readonly spending_controls?: { readonly allowed_categories?: readonly ( @@ -23229,7 +22635,7 @@ export interface operations { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[]; - readonly spending_limits?: readonly ({ + readonly spending_limits?: readonly { readonly amount: number; readonly categories?: readonly ( | "ac_refrigeration_repair" @@ -23522,8 +22928,8 @@ export interface operations { | "wrecking_and_salvage_yards" )[]; readonly interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; - } & { readonly [key: string]: any })[]; - } & { readonly [key: string]: any }; + }[]; + }; /** 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`. */ readonly status?: "active" | "canceled" | "inactive"; }; @@ -23556,7 +22962,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -23667,15 +23073,13 @@ export interface operations { readonly parameters: { readonly query: { /** Only return issuing settlements that were created during the given date interval. */ - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -23698,7 +23102,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -23786,15 +23190,13 @@ export interface operations { /** Only return transactions that belong to the given cardholder. */ readonly cardholder?: string; /** Only return transactions that were created during the given date interval. */ - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -23817,7 +23219,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -23891,9 +23293,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; }; }; }; @@ -23934,15 +23334,13 @@ export interface operations { readonly parameters: { readonly query: { /** Date this return was created. */ - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -23967,7 +23365,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -24019,15 +23417,13 @@ export interface operations { readonly parameters: { readonly query: { /** Date this order was created. */ - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** Only return orders for the given customer. */ readonly 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. */ @@ -24044,43 +23440,35 @@ export interface operations { readonly status?: string; /** Filter orders based on when they were paid, fulfilled, canceled, or returned. */ readonly status_transitions?: { - readonly canceled?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; - readonly fulfilled?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; - readonly paid?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; - readonly returned?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + readonly canceled?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; + readonly fulfilled?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; + readonly paid?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; + readonly returned?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; + }; /** Only return orders with the given upstream order IDs. */ readonly upstream_ids?: readonly string[]; }; @@ -24097,7 +23485,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -24143,14 +23531,14 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[]; /** List of items constituting the order. An order can have up to 25 items. */ - readonly items?: readonly ({ + readonly items?: readonly { readonly amount?: number; readonly currency?: string; readonly description?: string; readonly parent?: string; readonly quantity?: number; readonly type?: "discount" | "shipping" | "sku" | "tax"; - } & { readonly [key: string]: any })[]; + }[]; /** Set of key-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`. */ readonly metadata?: { readonly [key: string]: string }; /** Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. */ @@ -24162,10 +23550,10 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; readonly name: string; readonly phone?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -24230,16 +23618,14 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** 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. */ readonly selected_shipping_method?: string; /** Tracking information once the order has been fulfilled. */ readonly shipping?: { readonly carrier: string; readonly tracking_number: string; - } & { readonly [key: string]: any }; + }; /** 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). */ readonly status?: "canceled" | "created" | "fulfilled" | "paid" | "returned"; }; @@ -24313,16 +23699,16 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[]; /** List of items to return. */ - readonly items?: (Partial< - readonly ({ + readonly items?: Partial< + readonly { readonly amount?: number; readonly description?: string; readonly parent?: string; readonly quantity?: number; readonly type?: "discount" | "shipping" | "sku" | "tax"; - } & { readonly [key: string]: any })[] + }[] > & - Partial<"">) & { readonly [key: string]: any }; + Partial<"">; }; }; }; @@ -24332,15 +23718,13 @@ export interface operations { readonly parameters: { readonly 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. */ - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** Only return PaymentIntents for the customer specified by this customer ID. */ readonly 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. */ @@ -24365,7 +23749,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -24450,16 +23834,14 @@ export interface operations { readonly online?: { readonly ip_address: string; readonly user_agent: string; - } & { readonly [key: string]: any }; + }; readonly type: "offline" | "online"; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** Set of key-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`. */ readonly metadata?: { readonly [key: string]: string }; /** 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). */ - readonly off_session?: (Partial & Partial<"one_off" | "recurring">) & { - readonly [key: string]: any; - }; + readonly off_session?: Partial & Partial<"one_off" | "recurring">; /** 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). */ readonly on_behalf_of?: string; /** @@ -24470,24 +23852,20 @@ export interface operations { readonly payment_method?: string; /** Payment-method-specific configuration for this PaymentIntent. */ readonly payment_method_options?: { - readonly card?: (Partial< - { - readonly installments?: { - readonly enabled?: boolean; - readonly plan?: (Partial< - { - readonly count: number; - readonly interval: "month"; - readonly type: "fixed_count"; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; - readonly request_three_d_secure?: "any" | "automatic"; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + readonly card?: Partial<{ + readonly installments?: { + readonly enabled?: boolean; + readonly plan?: Partial<{ + readonly count: number; + readonly interval: "month"; + readonly type: "fixed_count"; + }> & + Partial<"">; + }; + readonly request_three_d_secure?: "any" | "automatic"; + }> & + Partial<"">; + }; /** The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this is not provided, defaults to ["card"]. */ readonly payment_method_types?: readonly string[]; /** Email address that the receipt for the resulting payment will be sent to. */ @@ -24511,12 +23889,12 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; readonly carrier?: string; readonly name: string; readonly phone?: string; readonly tracking_number?: string; - } & { readonly [key: string]: any }; + }; /** 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. */ readonly statement_descriptor?: string; /** 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. */ @@ -24528,7 +23906,7 @@ export interface operations { readonly transfer_data?: { readonly amount?: number; readonly destination: string; - } & { readonly [key: string]: any }; + }; /** 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. */ readonly transfer_group?: string; /** Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ @@ -24611,7 +23989,7 @@ export interface operations { /** 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). */ readonly amount?: number; /** 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. */ - readonly application_fee_amount?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly application_fee_amount?: Partial & Partial<"">; /** 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). */ readonly currency?: string; /** @@ -24627,35 +24005,29 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** 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. */ readonly payment_method?: string; /** Payment-method-specific configuration for this PaymentIntent. */ readonly payment_method_options?: { - readonly card?: (Partial< - { - readonly installments?: { - readonly enabled?: boolean; - readonly plan?: (Partial< - { - readonly count: number; - readonly interval: "month"; - readonly type: "fixed_count"; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; - readonly request_three_d_secure?: "any" | "automatic"; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + readonly card?: Partial<{ + readonly installments?: { + readonly enabled?: boolean; + readonly plan?: Partial<{ + readonly count: number; + readonly interval: "month"; + readonly type: "fixed_count"; + }> & + Partial<"">; + }; + readonly request_three_d_secure?: "any" | "automatic"; + }> & + Partial<"">; + }; /** The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ readonly payment_method_types?: readonly string[]; /** Email address that the receipt for the resulting payment will be sent to. */ - readonly receipt_email?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly receipt_email?: Partial & Partial<"">; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -24667,23 +24039,21 @@ export interface operations { */ readonly setup_future_usage?: "" | "off_session" | "on_session"; /** Shipping information for this PaymentIntent. */ - readonly shipping?: (Partial< - { - readonly address: { - readonly city?: string; - readonly country?: string; - readonly line1: string; - readonly line2?: string; - readonly postal_code?: string; - readonly state?: string; - } & { readonly [key: string]: any }; - readonly carrier?: string; - readonly name: string; - readonly phone?: string; - readonly tracking_number?: string; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly shipping?: Partial<{ + readonly address: { + readonly city?: string; + readonly country?: string; + readonly line1: string; + readonly line2?: string; + readonly postal_code?: string; + readonly state?: string; + }; + readonly carrier?: string; + readonly name: string; + readonly phone?: string; + readonly tracking_number?: string; + }> & + Partial<"">; /** 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. */ readonly statement_descriptor?: string; /** 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. */ @@ -24691,7 +24061,7 @@ export interface operations { /** 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). */ readonly transfer_data?: { readonly amount?: number; - } & { readonly [key: string]: any }; + }; /** 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. */ readonly transfer_group?: string; }; @@ -24784,7 +24154,7 @@ export interface operations { */ readonly transfer_data?: { readonly amount?: number; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -24848,60 +24218,50 @@ export interface operations { /** ID of the mandate to be used for this payment. */ readonly mandate?: string; /** This hash contains details about the Mandate to create */ - readonly mandate_data?: (Partial< - { + readonly mandate_data?: Partial<{ + readonly customer_acceptance: { + readonly accepted_at?: number; + readonly offline?: { readonly [key: string]: any }; + readonly online?: { + readonly ip_address: string; + readonly user_agent: string; + }; + readonly type: "offline" | "online"; + }; + }> & + Partial<{ readonly customer_acceptance: { - readonly accepted_at?: number; - readonly offline?: { readonly [key: string]: any }; - readonly online?: { - readonly ip_address: string; - readonly user_agent: string; - } & { readonly [key: string]: any }; - readonly type: "offline" | "online"; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any } - > & - Partial< - { - readonly customer_acceptance: { - readonly online: { - readonly ip_address?: string; - readonly user_agent?: string; - } & { readonly [key: string]: any }; - readonly type: "online"; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any } - >) & { readonly [key: string]: any }; + readonly online: { + readonly ip_address?: string; + readonly user_agent?: string; + }; + readonly type: "online"; + }; + }>; /** 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). */ - readonly off_session?: (Partial & Partial<"one_off" | "recurring">) & { - readonly [key: string]: any; - }; + readonly off_session?: Partial & Partial<"one_off" | "recurring">; /** 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. */ readonly payment_method?: string; /** Payment-method-specific configuration for this PaymentIntent. */ readonly payment_method_options?: { - readonly card?: (Partial< - { - readonly installments?: { - readonly enabled?: boolean; - readonly plan?: (Partial< - { - readonly count: number; - readonly interval: "month"; - readonly type: "fixed_count"; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; - readonly request_three_d_secure?: "any" | "automatic"; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + readonly card?: Partial<{ + readonly installments?: { + readonly enabled?: boolean; + readonly plan?: Partial<{ + readonly count: number; + readonly interval: "month"; + readonly type: "fixed_count"; + }> & + Partial<"">; + }; + readonly request_three_d_secure?: "any" | "automatic"; + }> & + Partial<"">; + }; /** The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ readonly payment_method_types?: readonly string[]; /** Email address that the receipt for the resulting payment will be sent to. */ - readonly receipt_email?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly receipt_email?: Partial & Partial<"">; /** * 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. @@ -24919,23 +24279,21 @@ export interface operations { */ readonly setup_future_usage?: "" | "off_session" | "on_session"; /** Shipping information for this PaymentIntent. */ - readonly shipping?: (Partial< - { - readonly address: { - readonly city?: string; - readonly country?: string; - readonly line1: string; - readonly line2?: string; - readonly postal_code?: string; - readonly state?: string; - } & { readonly [key: string]: any }; - readonly carrier?: string; - readonly name: string; - readonly phone?: string; - readonly tracking_number?: string; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly shipping?: Partial<{ + readonly address: { + readonly city?: string; + readonly country?: string; + readonly line1: string; + readonly line2?: string; + readonly postal_code?: string; + readonly state?: string; + }; + readonly carrier?: string; + readonly name: string; + readonly phone?: string; + readonly tracking_number?: string; + }> & + Partial<"">; /** Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ readonly use_stripe_sdk?: boolean; }; @@ -24972,7 +24330,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -25011,7 +24369,7 @@ export interface operations { readonly au_becs_debit?: { readonly account_number: string; readonly bsb_number: string; - } & { readonly [key: string]: any }; + }; /** Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. */ readonly billing_details?: { readonly address?: { @@ -25021,25 +24379,21 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; readonly email?: string; readonly name?: string; readonly phone?: string; - } & { readonly [key: string]: any }; + }; /** 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. */ - readonly card?: (Partial< - { - readonly cvc?: string; - readonly exp_month: number; - readonly exp_year: number; - readonly number: string; - } & { readonly [key: string]: any } - > & - Partial< - { - readonly token: string; - } & { readonly [key: string]: any } - >) & { readonly [key: string]: any }; + readonly card?: Partial<{ + readonly cvc?: string; + readonly exp_month: number; + readonly exp_year: number; + readonly number: string; + }> & + Partial<{ + readonly token: string; + }>; /** The `Customer` to whom the original PaymentMethod is attached. */ readonly customer?: string; /** Specifies which fields in the response should be expanded. */ @@ -25067,7 +24421,7 @@ export interface operations { | "rhb" | "standard_chartered" | "uob"; - } & { readonly [key: string]: any }; + }; /** If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. */ readonly ideal?: { readonly bank?: @@ -25083,7 +24437,7 @@ export interface operations { | "sns_bank" | "triodos_bank" | "van_lanschot"; - } & { readonly [key: string]: any }; + }; /** Set of key-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`. */ readonly metadata?: { readonly [key: string]: string }; /** The PaymentMethod to share. */ @@ -25091,7 +24445,7 @@ export interface operations { /** If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. */ readonly sepa_debit?: { readonly iban: string; - } & { readonly [key: string]: any }; + }; /** 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) */ readonly type?: "au_becs_debit" | "card" | "fpx" | "ideal" | "sepa_debit"; }; @@ -25162,22 +24516,20 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; readonly email?: string; readonly name?: string; readonly phone?: string; - } & { readonly [key: string]: any }; + }; /** If this is a `card` PaymentMethod, this hash contains the user's card details. */ readonly card?: { readonly exp_month?: number; readonly exp_year?: number; - } & { readonly [key: string]: any }; + }; /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. */ readonly sepa_debit?: { readonly [key: string]: any }; }; @@ -25262,24 +24614,20 @@ export interface operations { readonly GetPayouts: { readonly parameters: { readonly query: { - readonly arrival_date?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly arrival_date?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** The ID of an external account - only return payouts sent to this external account. */ readonly 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. */ @@ -25306,7 +24654,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -25427,9 +24775,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; }; }; }; @@ -25471,15 +24817,13 @@ export interface operations { /** Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). */ readonly 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. */ - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -25504,7 +24848,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -25560,37 +24904,33 @@ export interface operations { /** 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). */ readonly interval_count?: number; /** Set of key-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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** A brief description of the plan, hidden from customers. */ readonly nickname?: string; - readonly product?: (Partial< - { - readonly active?: boolean; - readonly id?: string; - readonly metadata?: { readonly [key: string]: string }; - readonly name: string; - readonly statement_descriptor?: string; - readonly unit_label?: string; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly product?: Partial<{ + readonly active?: boolean; + readonly id?: string; + readonly metadata?: { readonly [key: string]: string }; + readonly name: string; + readonly statement_descriptor?: string; + readonly unit_label?: string; + }> & + Partial; /** Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ - readonly tiers?: readonly ({ + readonly tiers?: readonly { readonly flat_amount?: number; readonly flat_amount_decimal?: string; readonly unit_amount?: number; readonly unit_amount_decimal?: string; - readonly up_to: (Partial<"inf"> & Partial) & { readonly [key: string]: any }; - } & { readonly [key: string]: any })[]; + readonly up_to: Partial<"inf"> & Partial; + }[]; /** 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. */ readonly tiers_mode?: "graduated" | "volume"; /** Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. */ readonly transform_usage?: { readonly divide_by: number; readonly round: "down" | "up"; - } & { readonly [key: string]: any }; + }; /** 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). */ readonly trial_period_days?: number; /** 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`. */ @@ -25659,9 +24999,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** A brief description of the plan, hidden from customers. */ readonly nickname?: string; /** The product the plan belongs to. Note that after updating, statement descriptors and line items of the plan in active subscriptions will be affected. */ @@ -25706,15 +25044,13 @@ export interface operations { /** Only return products that are active or inactive (e.g., pass `false` to list all inactive products). */ readonly active?: boolean; /** Only return products that were created during the given date interval. */ - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -25745,7 +25081,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -25806,7 +25142,7 @@ export interface operations { readonly length: number; readonly weight: number; readonly width: number; - } & { readonly [key: string]: any }; + }; /** Whether this product is shipped (i.e., physical goods). Defaults to `true`. May only be set if type=`good`. */ readonly shippable?: boolean; /** @@ -25884,7 +25220,7 @@ export interface operations { /** Whether the product is available for purchase. */ readonly active?: boolean; /** 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. */ - readonly attributes?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly attributes?: Partial & Partial<"">; /** A short one-line description of the product, meant to be displayable to the customer. May only be set if `type=good`. */ readonly caption?: string; /** 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`. */ @@ -25894,23 +25230,19 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[]; /** A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - readonly images?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly images?: Partial & Partial<"">; /** Set of key-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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** 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. */ readonly name?: string; /** 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`. */ - readonly package_dimensions?: (Partial< - { - readonly height: number; - readonly length: number; - readonly weight: number; - readonly width: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly package_dimensions?: Partial<{ + readonly height: number; + readonly length: number; + readonly weight: number; + readonly width: number; + }> & + Partial<"">; /** Whether this product is shipped (i.e., physical goods). Defaults to `true`. May only be set if `type=good`. */ readonly shippable?: boolean; /** @@ -25983,7 +25315,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -26038,15 +25370,13 @@ export interface operations { readonly GetRadarValueListItems: { readonly parameters: { readonly query: { - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -26073,7 +25403,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -26184,15 +25514,13 @@ export interface operations { readonly alias?: string; /** A value contained within a value list - returns all value lists containing this value. */ readonly contains?: string; - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -26215,7 +25543,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -26369,15 +25697,13 @@ export interface operations { readonly GetRecipients: { readonly parameters: { readonly query: { - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -26403,7 +25729,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -26452,9 +25778,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** 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. */ readonly name: string; /** The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ @@ -26480,8 +25804,8 @@ export interface operations { /** Successful response. */ readonly 200: { readonly content: { - readonly "application/json": (Partial & - Partial) & { readonly [key: string]: any }; + readonly "application/json": Partial & + Partial; }; }; /** Error response. */ @@ -26540,9 +25864,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** 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. */ readonly name?: string; /** The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ @@ -26584,15 +25906,13 @@ export interface operations { readonly query: { /** Only return refunds for the charge specified by this charge ID. */ readonly charge?: string; - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -26617,7 +25937,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -26657,9 +25977,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; readonly payment_intent?: string; readonly reason?: "duplicate" | "fraudulent" | "requested_by_customer"; readonly refund_application_fee?: boolean; @@ -26730,9 +26048,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; }; }; }; @@ -26741,15 +26057,13 @@ export interface operations { readonly GetReportingReportRuns: { readonly parameters: { readonly query: { - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -26772,7 +26086,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -27444,7 +26758,7 @@ export interface operations { | "W-SU" | "WET" | "Zulu"; - } & { readonly [key: string]: any }; + }; /** The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. */ readonly report_type: string; }; @@ -27502,7 +26816,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -27553,15 +26867,13 @@ export interface operations { readonly GetReviews: { readonly parameters: { readonly query: { - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -27584,7 +26896,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -27666,15 +26978,13 @@ export interface operations { readonly parameters: { readonly 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. */ - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** Only return SetupIntents for the customer specified by this customer ID. */ readonly 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. */ @@ -27701,7 +27011,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -27761,10 +27071,10 @@ export interface operations { readonly online?: { readonly ip_address: string; readonly user_agent: string; - } & { readonly [key: string]: any }; + }; readonly type: "offline" | "online"; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** Set of key-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`. */ readonly metadata?: { readonly [key: string]: string }; /** The Stripe account ID for which this SetupIntent is created. */ @@ -27775,8 +27085,8 @@ export interface operations { readonly payment_method_options?: { readonly card?: { readonly request_three_d_secure?: "any" | "automatic"; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** The list of payment method types (e.g. card) that this SetupIntent is allowed to use. If this is not provided, defaults to ["card"]. */ readonly payment_method_types?: readonly string[]; /** 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). */ @@ -27785,7 +27095,7 @@ export interface operations { readonly single_use?: { readonly amount: number; readonly currency: string; - } & { readonly [key: string]: any }; + }; /** Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. */ readonly usage?: "off_session" | "on_session"; }; @@ -27866,17 +27176,15 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ readonly payment_method?: string; /** Payment-method-specific configuration for this SetupIntent. */ readonly payment_method_options?: { readonly card?: { readonly request_three_d_secure?: "any" | "automatic"; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** 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"]. */ readonly payment_method_types?: readonly string[]; }; @@ -27962,38 +27270,34 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[]; /** This hash contains details about the Mandate to create */ - readonly mandate_data?: (Partial< - { + readonly mandate_data?: Partial<{ + readonly customer_acceptance: { + readonly accepted_at?: number; + readonly offline?: { readonly [key: string]: any }; + readonly online?: { + readonly ip_address: string; + readonly user_agent: string; + }; + readonly type: "offline" | "online"; + }; + }> & + Partial<{ readonly customer_acceptance: { - readonly accepted_at?: number; - readonly offline?: { readonly [key: string]: any }; - readonly online?: { - readonly ip_address: string; - readonly user_agent: string; - } & { readonly [key: string]: any }; - readonly type: "offline" | "online"; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any } - > & - Partial< - { - readonly customer_acceptance: { - readonly online: { - readonly ip_address?: string; - readonly user_agent?: string; - } & { readonly [key: string]: any }; - readonly type: "online"; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any } - >) & { readonly [key: string]: any }; + readonly online: { + readonly ip_address?: string; + readonly user_agent?: string; + }; + readonly type: "online"; + }; + }>; /** ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ readonly payment_method?: string; /** Payment-method-specific configuration for this SetupIntent. */ readonly payment_method_options?: { readonly card?: { readonly request_three_d_secure?: "any" | "automatic"; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** * 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. @@ -28030,7 +27334,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -28113,7 +27417,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -28165,7 +27469,7 @@ export interface operations { readonly quantity?: number; readonly type?: "bucket" | "finite" | "infinite"; readonly value?: "" | "in_stock" | "limited" | "out_of_stock"; - } & { readonly [key: string]: any }; + }; /** Set of key-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`. */ readonly metadata?: { readonly [key: string]: string }; /** The dimensions of this SKU for shipping purposes. */ @@ -28174,7 +27478,7 @@ export interface operations { readonly length: number; readonly weight: number; readonly width: number; - } & { readonly [key: string]: any }; + }; /** 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). */ readonly price: number; /** The ID of the product this SKU is associated with. Must be a product with type `good`. */ @@ -28198,8 +27502,8 @@ export interface operations { /** Successful response. */ readonly 200: { readonly content: { - readonly "application/json": (Partial & - Partial) & { readonly [key: string]: any }; + readonly "application/json": Partial & + Partial; }; }; /** Error response. */ @@ -28258,21 +27562,17 @@ export interface operations { readonly quantity?: number; readonly type?: "bucket" | "finite" | "infinite"; readonly value?: "" | "in_stock" | "limited" | "out_of_stock"; - } & { readonly [key: string]: any }; - /** Set of key-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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; }; + /** Set of key-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`. */ + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** The dimensions of this SKU for shipping purposes. */ - readonly package_dimensions?: (Partial< - { - readonly height: number; - readonly length: number; - readonly weight: number; - readonly width: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly package_dimensions?: Partial<{ + readonly height: number; + readonly length: number; + readonly weight: number; + readonly width: number; + }> & + Partial<"">; /** 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). */ readonly price?: number; /** 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`. */ @@ -28344,21 +27644,21 @@ export interface operations { readonly ip?: string; readonly offline?: { readonly contact_email: string; - } & { readonly [key: string]: any }; + }; readonly online?: { readonly date?: number; readonly ip?: string; readonly user_agent?: string; - } & { readonly [key: string]: any }; + }; readonly status: "accepted" | "pending" | "refused" | "revoked"; readonly type?: "offline" | "online"; readonly user_agent?: string; - } & { readonly [key: string]: any }; - readonly amount?: (Partial & Partial<"">) & { readonly [key: string]: any }; + }; + readonly amount?: Partial & Partial<"">; readonly currency?: string; readonly interval?: "one_time" | "scheduled" | "variable"; readonly notification_method?: "deprecated_none" | "email" | "manual" | "none" | "stripe_email"; - } & { readonly [key: string]: any }; + }; readonly metadata?: { readonly [key: string]: string }; /** The source to share. */ readonly original_source?: string; @@ -28371,29 +27671,29 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; readonly email?: string; readonly name?: string; readonly phone?: string; - } & { readonly [key: string]: any }; + }; /** Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). */ readonly receiver?: { readonly refund_attributes_method?: "email" | "manual" | "none"; - } & { readonly [key: string]: any }; + }; /** Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). */ readonly redirect?: { readonly return_url: string; - } & { readonly [key: string]: any }; + }; /** Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. */ readonly source_order?: { - readonly items?: readonly ({ + readonly items?: readonly { readonly amount?: number; readonly currency?: string; readonly description?: string; readonly parent?: string; readonly quantity?: number; readonly type?: "discount" | "shipping" | "sku" | "tax"; - } & { readonly [key: string]: any })[]; + }[]; readonly shipping?: { readonly address: { readonly city?: string; @@ -28402,13 +27702,13 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; readonly carrier?: string; readonly name?: string; readonly phone?: string; readonly tracking_number?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** 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. */ readonly statement_descriptor?: string; /** An optional token used to create the source. When passed, token properties will override source parameters. */ @@ -28492,25 +27792,23 @@ export interface operations { readonly ip?: string; readonly offline?: { readonly contact_email: string; - } & { readonly [key: string]: any }; + }; readonly online?: { readonly date?: number; readonly ip?: string; readonly user_agent?: string; - } & { readonly [key: string]: any }; + }; readonly status: "accepted" | "pending" | "refused" | "revoked"; readonly type?: "offline" | "online"; readonly user_agent?: string; - } & { readonly [key: string]: any }; - readonly amount?: (Partial & Partial<"">) & { readonly [key: string]: any }; + }; + readonly amount?: Partial & Partial<"">; readonly currency?: string; readonly interval?: "one_time" | "scheduled" | "variable"; readonly notification_method?: "deprecated_none" | "email" | "manual" | "none" | "stripe_email"; - } & { readonly [key: string]: any }; - /** Set of key-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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; }; + /** Set of key-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`. */ + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** Information about the owner of the payment instrument that may be used or required by particular source types. */ readonly owner?: { readonly address?: { @@ -28520,21 +27818,21 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; readonly email?: string; readonly name?: string; readonly phone?: string; - } & { readonly [key: string]: any }; + }; /** Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. */ readonly source_order?: { - readonly items?: readonly ({ + readonly items?: readonly { readonly amount?: number; readonly currency?: string; readonly description?: string; readonly parent?: string; readonly quantity?: number; readonly type?: "discount" | "shipping" | "sku" | "tax"; - } & { readonly [key: string]: any })[]; + }[]; readonly shipping?: { readonly address: { readonly city?: string; @@ -28543,13 +27841,13 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; readonly carrier?: string; readonly name?: string; readonly phone?: string; readonly tracking_number?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; }; }; }; @@ -28615,7 +27913,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -28723,7 +28021,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -28759,12 +28057,10 @@ export interface operations { readonly content: { readonly "application/x-www-form-urlencoded": { /** 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. */ - readonly billing_thresholds?: (Partial< - { - readonly usage_gte: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly billing_thresholds?: Partial<{ + readonly usage_gte: number; + }> & + Partial<"">; /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ @@ -28796,7 +28092,7 @@ export interface operations { /** The identifier of the subscription to modify. */ readonly subscription: string; /** 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. */ - readonly tax_rates?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly tax_rates?: Partial & Partial<"">; }; }; }; @@ -28857,18 +28153,14 @@ export interface operations { readonly content: { readonly "application/x-www-form-urlencoded": { /** 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. */ - readonly billing_thresholds?: (Partial< - { - readonly usage_gte: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly billing_thresholds?: Partial<{ + readonly usage_gte: number; + }> & + Partial<"">; /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ readonly off_session?: boolean; /** @@ -28896,7 +28188,7 @@ export interface operations { /** The quantity you'd like to apply to the subscription item you're creating. */ readonly quantity?: number; /** 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. */ - readonly tax_rates?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly tax_rates?: Partial & Partial<"">; }; }; }; @@ -28976,7 +28268,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -29041,35 +28333,29 @@ export interface operations { readonly parameters: { readonly query: { /** Only return subscription schedules that were created canceled the given date interval. */ - readonly canceled_at?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly canceled_at?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** Only return subscription schedules that completed during the given date interval. */ - readonly completed_at?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly completed_at?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** Only return subscription schedules that were created during the given date interval. */ - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** Only return subscription schedules for the given customer. */ readonly 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. */ @@ -29079,15 +28365,13 @@ export interface operations { /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ readonly limit?: number; /** Only return subscription schedules that were released during the given date interval. */ - readonly released_at?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly released_at?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** Only return subscription schedules that have not started yet. */ readonly 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. */ @@ -29106,7 +28390,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -29145,19 +28429,17 @@ export interface operations { readonly customer?: string; /** Object representing the subscription schedule's default settings. */ readonly default_settings?: { - readonly billing_thresholds?: (Partial< - { - readonly amount_gte?: number; - readonly reset_billing_cycle_anchor?: boolean; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly billing_thresholds?: Partial<{ + readonly amount_gte?: number; + readonly reset_billing_cycle_anchor?: boolean; + }> & + Partial<"">; readonly collection_method?: "charge_automatically" | "send_invoice"; readonly default_payment_method?: string; readonly invoice_settings?: { readonly days_until_due?: number; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** 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. */ readonly end_behavior?: "cancel" | "none" | "release" | "renew"; /** Specifies which fields in the response should be expanded. */ @@ -29165,46 +28447,40 @@ export interface operations { /** 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. */ readonly from_subscription?: 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** 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. */ - readonly phases?: readonly ({ + readonly phases?: readonly { readonly application_fee_percent?: number; - readonly billing_thresholds?: (Partial< - { - readonly amount_gte?: number; - readonly reset_billing_cycle_anchor?: boolean; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly billing_thresholds?: Partial<{ + readonly amount_gte?: number; + readonly reset_billing_cycle_anchor?: boolean; + }> & + Partial<"">; readonly collection_method?: "charge_automatically" | "send_invoice"; readonly coupon?: string; readonly default_payment_method?: string; - readonly default_tax_rates?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly default_tax_rates?: Partial & Partial<"">; readonly end_date?: number; readonly invoice_settings?: { readonly days_until_due?: number; - } & { readonly [key: string]: any }; + }; readonly iterations?: number; - readonly plans: readonly ({ - readonly billing_thresholds?: (Partial< - { - readonly usage_gte: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly plans: readonly { + readonly billing_thresholds?: Partial<{ + readonly usage_gte: number; + }> & + Partial<"">; readonly plan?: string; readonly quantity?: number; - readonly tax_rates?: (Partial & Partial<"">) & { readonly [key: string]: any }; - } & { readonly [key: string]: any })[]; + readonly tax_rates?: Partial & Partial<"">; + }[]; readonly proration_behavior?: "always_invoice" | "create_prorations" | "none"; readonly tax_percent?: number; readonly trial?: boolean; readonly trial_end?: number; - } & { readonly [key: string]: any })[]; + }[]; /** 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. */ - readonly start_date?: (Partial & Partial<"now">) & { readonly [key: string]: any }; + readonly start_date?: Partial & Partial<"now">; }; }; }; @@ -29266,63 +28542,55 @@ export interface operations { readonly "application/x-www-form-urlencoded": { /** Object representing the subscription schedule's default settings. */ readonly default_settings?: { - readonly billing_thresholds?: (Partial< - { - readonly amount_gte?: number; - readonly reset_billing_cycle_anchor?: boolean; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly billing_thresholds?: Partial<{ + readonly amount_gte?: number; + readonly reset_billing_cycle_anchor?: boolean; + }> & + Partial<"">; readonly collection_method?: "charge_automatically" | "send_invoice"; readonly default_payment_method?: string; readonly invoice_settings?: { readonly days_until_due?: number; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; /** 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. */ readonly end_behavior?: "cancel" | "none" | "release" | "renew"; /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** 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. */ - readonly phases?: readonly ({ + readonly phases?: readonly { readonly application_fee_percent?: number; - readonly billing_thresholds?: (Partial< - { - readonly amount_gte?: number; - readonly reset_billing_cycle_anchor?: boolean; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly billing_thresholds?: Partial<{ + readonly amount_gte?: number; + readonly reset_billing_cycle_anchor?: boolean; + }> & + Partial<"">; readonly collection_method?: "charge_automatically" | "send_invoice"; readonly coupon?: string; readonly default_payment_method?: string; - readonly default_tax_rates?: (Partial & Partial<"">) & { readonly [key: string]: any }; - readonly end_date?: (Partial & Partial<"now">) & { readonly [key: string]: any }; + readonly default_tax_rates?: Partial & Partial<"">; + readonly end_date?: Partial & Partial<"now">; readonly invoice_settings?: { readonly days_until_due?: number; - } & { readonly [key: string]: any }; + }; readonly iterations?: number; - readonly plans: readonly ({ - readonly billing_thresholds?: (Partial< - { - readonly usage_gte: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly plans: readonly { + readonly billing_thresholds?: Partial<{ + readonly usage_gte: number; + }> & + Partial<"">; readonly plan?: string; readonly quantity?: number; - readonly tax_rates?: (Partial & Partial<"">) & { readonly [key: string]: any }; - } & { readonly [key: string]: any })[]; + readonly tax_rates?: Partial & Partial<"">; + }[]; readonly proration_behavior?: "always_invoice" | "create_prorations" | "none"; - readonly start_date?: (Partial & Partial<"now">) & { readonly [key: string]: any }; + readonly start_date?: Partial & Partial<"now">; readonly tax_percent?: number; readonly trial?: boolean; - readonly trial_end?: (Partial & Partial<"now">) & { readonly [key: string]: any }; - } & { readonly [key: string]: any })[]; + readonly trial_end?: Partial & Partial<"now">; + }[]; /** 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`. */ readonly prorate?: boolean; /** 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`. */ @@ -29403,33 +28671,27 @@ export interface operations { readonly query: { /** The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. */ readonly collection_method?: "charge_automatically" | "send_invoice"; - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; - readonly current_period_end?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; - readonly current_period_start?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; + readonly current_period_end?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; + readonly current_period_start?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** The ID of the customer whose subscriptions will be retrieved. */ readonly 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. */ @@ -29467,7 +28729,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -29509,13 +28771,11 @@ export interface operations { /** 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. */ readonly billing_cycle_anchor?: number; /** 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. */ - readonly billing_thresholds?: (Partial< - { - readonly amount_gte?: number; - readonly reset_billing_cycle_anchor?: boolean; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly billing_thresholds?: Partial<{ + readonly amount_gte?: number; + readonly reset_billing_cycle_anchor?: boolean; + }> & + Partial<"">; /** 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. */ readonly cancel_at?: number; /** Boolean indicating whether this subscription should cancel at the end of the current period. */ @@ -29533,26 +28793,22 @@ export interface operations { /** 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. */ readonly default_source?: string; /** 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. */ - readonly default_tax_rates?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly default_tax_rates?: Partial & Partial<"">; /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[]; /** A list of up to 20 subscription items, each with an attached plan. */ - readonly items?: readonly ({ - readonly billing_thresholds?: (Partial< - { - readonly usage_gte: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly items?: readonly { + readonly billing_thresholds?: Partial<{ + readonly usage_gte: number; + }> & + Partial<"">; readonly metadata?: { readonly [key: string]: string }; readonly plan?: string; readonly quantity?: number; - readonly tax_rates?: (Partial & Partial<"">) & { readonly [key: string]: any }; - } & { readonly [key: string]: any })[]; + readonly tax_rates?: Partial & Partial<"">; + }[]; /** Set of key-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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ readonly off_session?: boolean; /** @@ -29564,13 +28820,11 @@ export interface operations { */ readonly payment_behavior?: "allow_incomplete" | "error_if_incomplete" | "pending_if_incomplete"; /** 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. */ - readonly pending_invoice_item_interval?: (Partial< - { - readonly interval: "day" | "month" | "week" | "year"; - readonly interval_count?: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly pending_invoice_item_interval?: Partial<{ + readonly interval: "day" | "month" | "week" | "year"; + readonly interval_count?: number; + }> & + Partial<"">; /** 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`. */ readonly prorate?: boolean; /** @@ -29580,9 +28834,9 @@ export interface operations { */ readonly proration_behavior?: "always_invoice" | "create_prorations" | "none"; /** 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`. */ - readonly tax_percent?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly tax_percent?: Partial & Partial<"">; /** 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`. */ - readonly trial_end?: (Partial<"now"> & Partial) & { readonly [key: string]: any }; + readonly trial_end?: Partial<"now"> & Partial; /** 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. */ readonly trial_from_plan?: boolean; /** 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. */ @@ -29651,15 +28905,13 @@ export interface operations { /** 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). */ readonly billing_cycle_anchor?: "now" | "unchanged"; /** 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. */ - readonly billing_thresholds?: (Partial< - { - readonly amount_gte?: number; - readonly reset_billing_cycle_anchor?: boolean; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly billing_thresholds?: Partial<{ + readonly amount_gte?: number; + readonly reset_billing_cycle_anchor?: boolean; + }> & + Partial<"">; /** 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. */ - readonly cancel_at?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly cancel_at?: Partial & Partial<"">; /** Boolean indicating whether this subscription should cancel at the end of the current period. */ readonly cancel_at_period_end?: boolean; /** 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`. */ @@ -29673,41 +28925,33 @@ export interface operations { /** 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. */ readonly default_source?: string; /** 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. */ - readonly default_tax_rates?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly default_tax_rates?: Partial & Partial<"">; /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[]; /** List of subscription items, each with an attached plan. */ - readonly items?: readonly ({ - readonly billing_thresholds?: (Partial< - { - readonly usage_gte: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly items?: readonly { + readonly billing_thresholds?: Partial<{ + readonly usage_gte: number; + }> & + Partial<"">; readonly clear_usage?: boolean; readonly deleted?: boolean; readonly id?: string; - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; readonly plan?: string; readonly quantity?: number; - readonly tax_rates?: (Partial & Partial<"">) & { readonly [key: string]: any }; - } & { readonly [key: string]: any })[]; + readonly tax_rates?: Partial & Partial<"">; + }[]; /** Set of key-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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ readonly off_session?: boolean; /** If specified, payment collection for this subscription will be paused. */ - readonly pause_collection?: (Partial< - { - readonly behavior: "keep_as_draft" | "mark_uncollectible" | "void"; - readonly resumes_at?: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly pause_collection?: Partial<{ + readonly behavior: "keep_as_draft" | "mark_uncollectible" | "void"; + readonly resumes_at?: number; + }> & + Partial<"">; /** * 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. * @@ -29717,13 +28961,11 @@ export interface operations { */ readonly payment_behavior?: "allow_incomplete" | "error_if_incomplete" | "pending_if_incomplete"; /** 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. */ - readonly pending_invoice_item_interval?: (Partial< - { - readonly interval: "day" | "month" | "week" | "year"; - readonly interval_count?: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + readonly pending_invoice_item_interval?: Partial<{ + readonly interval: "day" | "month" | "week" | "year"; + readonly interval_count?: number; + }> & + Partial<"">; /** 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`. */ readonly prorate?: boolean; /** @@ -29737,9 +28979,9 @@ export interface operations { /** 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. */ readonly proration_date?: number; /** 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`. */ - readonly tax_percent?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly tax_percent?: Partial & Partial<"">; /** 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`. */ - readonly trial_end?: (Partial<"now"> & Partial) & { readonly [key: string]: any }; + readonly trial_end?: Partial<"now"> & Partial; /** 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. */ readonly trial_from_plan?: boolean; }; @@ -29820,15 +29062,13 @@ export interface operations { /** Optional flag to filter by tax rates that are either active or not active (archived) */ readonly active?: boolean; /** Optional range for filtering created date */ - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -29853,7 +29093,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -29974,9 +29214,7 @@ export interface operations { /** The jurisdiction for the tax rate. */ readonly jurisdiction?: 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; }; }; }; @@ -30034,7 +29272,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -30077,15 +29315,13 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; /** A name for the location. */ readonly display_name: string; /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; }; }; }; @@ -30153,15 +29389,13 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; /** A name for the location. */ readonly display_name?: string; /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; }; }; }; @@ -30226,7 +29460,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -30268,9 +29502,7 @@ export interface operations { /** The location to assign the reader to. If no location is specified, the reader will be assigned to the account's default location. */ readonly location?: 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** A code generated by the reader used for registering to an account. */ readonly registration_code: string; }; @@ -30337,9 +29569,7 @@ export interface operations { /** The new label of the reader. */ readonly label?: 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; }; }; }; @@ -30404,7 +29634,7 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; readonly address_kana?: { readonly city?: string; readonly country?: string; @@ -30413,7 +29643,7 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; readonly address_kanji?: { readonly city?: string; readonly country?: string; @@ -30422,7 +29652,7 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; readonly directors_provided?: boolean; readonly executives_provided?: boolean; readonly name?: string; @@ -30454,9 +29684,9 @@ export interface operations { readonly document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; + }; readonly individual?: { readonly address?: { readonly city?: string; @@ -30465,7 +29695,7 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; readonly address_kana?: { readonly city?: string; readonly country?: string; @@ -30474,7 +29704,7 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; readonly address_kanji?: { readonly city?: string; readonly country?: string; @@ -30483,15 +29713,13 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; - readonly dob?: (Partial< - { - readonly day: number; - readonly month: number; - readonly year: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + }; + readonly dob?: Partial<{ + readonly day: number; + readonly month: number; + readonly year: number; + }> & + Partial<"">; readonly email?: string; readonly first_name?: string; readonly first_name_kana?: string; @@ -30502,24 +29730,22 @@ export interface operations { readonly last_name_kana?: string; readonly last_name_kanji?: string; readonly maiden_name?: string; - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; readonly phone?: string; readonly ssn_last_4?: string; readonly verification?: { readonly additional_document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; + }; readonly document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; + }; readonly tos_shown_and_accepted?: boolean; - } & { readonly [key: string]: any }; + }; /** The bank account this token will represent. */ readonly bank_account?: { readonly account_holder_name?: string; @@ -30528,24 +29754,22 @@ export interface operations { readonly country: string; readonly currency?: string; readonly routing_number?: string; - } & { readonly [key: string]: any }; - readonly card?: (Partial< - { - readonly address_city?: string; - readonly address_country?: string; - readonly address_line1?: string; - readonly address_line2?: string; - readonly address_state?: string; - readonly address_zip?: string; - readonly currency?: string; - readonly cvc?: string; - readonly exp_month: string; - readonly exp_year: string; - readonly name?: string; - readonly number: string; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + }; + readonly card?: Partial<{ + readonly address_city?: string; + readonly address_country?: string; + readonly address_line1?: string; + readonly address_line2?: string; + readonly address_state?: string; + readonly address_zip?: string; + readonly currency?: string; + readonly cvc?: string; + readonly exp_month: string; + readonly exp_year: string; + readonly name?: string; + readonly number: string; + }> & + Partial; /** 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). */ readonly customer?: string; /** Specifies which fields in the response should be expanded. */ @@ -30559,7 +29783,7 @@ export interface operations { readonly line2?: string; readonly postal_code?: string; readonly state?: string; - } & { readonly [key: string]: any }; + }; readonly address_kana?: { readonly city?: string; readonly country?: string; @@ -30568,7 +29792,7 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; + }; readonly address_kanji?: { readonly city?: string; readonly country?: string; @@ -30577,15 +29801,13 @@ export interface operations { readonly postal_code?: string; readonly state?: string; readonly town?: string; - } & { readonly [key: string]: any }; - readonly dob?: (Partial< - { - readonly day: number; - readonly month: number; - readonly year: number; - } & { readonly [key: string]: any } - > & - Partial<"">) & { readonly [key: string]: any }; + }; + readonly dob?: Partial<{ + readonly day: number; + readonly month: number; + readonly year: number; + }> & + Partial<"">; readonly email?: string; readonly first_name?: string; readonly first_name_kana?: string; @@ -30596,34 +29818,32 @@ export interface operations { readonly last_name_kana?: string; readonly last_name_kanji?: string; readonly maiden_name?: string; - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; readonly phone?: string; readonly relationship?: { readonly director?: boolean; readonly executive?: boolean; readonly owner?: boolean; - readonly percent_ownership?: (Partial & Partial<"">) & { readonly [key: string]: any }; + readonly percent_ownership?: Partial & Partial<"">; readonly representative?: boolean; readonly title?: string; - } & { readonly [key: string]: any }; + }; readonly ssn_last_4?: string; readonly verification?: { readonly additional_document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; + }; readonly document?: { readonly back?: string; readonly front?: string; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; - } & { readonly [key: string]: any }; + }; + }; + }; /** The PII this token will represent. */ readonly pii?: { readonly id_number?: string; - } & { readonly [key: string]: any }; + }; }; }; }; @@ -30664,25 +29884,21 @@ export interface operations { readonly parameters: { readonly query: { /** A positive integer representing how much to transfer. */ - readonly amount?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly amount?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** 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. */ - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -30707,7 +29923,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -30751,9 +29967,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** 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)). */ readonly source?: string; /** Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. */ @@ -30824,9 +30038,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; }; }; }; @@ -30865,15 +30077,13 @@ export interface operations { readonly GetTransfers: { readonly parameters: { readonly query: { - readonly created?: (Partial< - { - readonly gt?: number; - readonly gte?: number; - readonly lt?: number; - readonly lte?: number; - } & { readonly [key: string]: any } - > & - Partial) & { readonly [key: string]: any }; + readonly created?: Partial<{ + readonly gt?: number; + readonly gte?: number; + readonly lt?: number; + readonly lte?: number; + }> & + Partial; /** Only return transfers for the destination specified by this account ID. */ readonly 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. */ @@ -30901,7 +30111,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -30988,7 +30198,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -31041,9 +30251,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** 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. */ readonly refund_application_fee?: boolean; }; @@ -31114,9 +30322,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; }; }; }; @@ -31185,9 +30391,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; }; }; }; @@ -31218,7 +30422,7 @@ export interface operations { readonly object: "list"; /** The URL where this list can be accessed. */ readonly url: string; - } & { readonly [key: string]: any }; + }; }; }; /** Error response. */ @@ -31509,9 +30713,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** The URL of the webhook endpoint. */ readonly url: string; }; @@ -31732,9 +30934,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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`. */ - readonly metadata?: (Partial<{ readonly [key: string]: string }> & Partial<"">) & { - readonly [key: string]: any; - }; + readonly metadata?: Partial<{ readonly [key: string]: string }> & Partial<"">; /** The URL of the webhook endpoint. */ readonly url?: string; }; diff --git a/tests/v3/expected/stripe.ts b/tests/v3/expected/stripe.ts index 68cf15715..8461aba6e 100644 --- a/tests/v3/expected/stripe.ts +++ b/tests/v3/expected/stripe.ts @@ -1492,7 +1492,7 @@ export interface components { */ account: { /** Business information about the account. */ - business_profile?: (Partial & { [key: string]: any }) | null; + business_profile?: Partial | null; /** The business type. */ business_type?: ("company" | "government_entity" | "individual" | "non_profit") | null; capabilities?: components["schemas"]["account_capabilities"]; @@ -1512,16 +1512,14 @@ export interface components { /** External accounts (bank accounts and debit cards) currently attached to this account */ external_accounts?: { /** The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ - data: ((Partial & Partial) & { - [key: string]: any; - })[]; + data: (Partial & Partial)[]; /** True if this list has another page of items after this one that can be fetched. */ has_more: boolean; /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; /** Unique identifier for the object. */ id: string; individual?: components["schemas"]["person"]; @@ -1533,21 +1531,21 @@ export interface components { payouts_enabled?: boolean; requirements?: components["schemas"]["account_requirements"]; /** Options for customizing how the account functions within Stripe. */ - settings?: (Partial & { [key: string]: any }) | null; + settings?: Partial | null; tos_acceptance?: components["schemas"]["account_tos_acceptance"]; /** The Stripe account type. Can be `standard`, `express`, or `custom`. */ type?: "custom" | "express" | "standard"; - } & { [key: string]: any }; + }; account_branding_settings: { /** (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?: ((Partial & Partial) & { [key: string]: any }) | null; + icon?: (Partial & Partial) | null; /** (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?: ((Partial & Partial) & { [key: string]: any }) | null; + logo?: (Partial & Partial) | null; /** A CSS hex color value representing the primary branding color for this account */ primary_color?: string | null; /** A CSS hex color value representing the secondary branding color for this account */ secondary_color?: string | null; - } & { [key: string]: any }; + }; account_business_profile: { /** [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; @@ -1556,7 +1554,7 @@ export interface components { /** 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; /** A publicly available mailing address for sending support issues to. */ - support_address?: (Partial & { [key: string]: any }) | null; + support_address?: Partial | null; /** A publicly available email address for sending support issues to. */ support_email?: string | null; /** A publicly available phone number to call with support issues. */ @@ -1565,7 +1563,7 @@ export interface components { support_url?: string | null; /** The business's publicly available website. */ url?: string | null; - } & { [key: string]: any }; + }; account_capabilities: { /** 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. */ au_becs_debit_payments?: "active" | "inactive" | "pending"; @@ -1581,7 +1579,7 @@ export interface components { tax_reporting_us_1099_misc?: "active" | "inactive" | "pending"; /** The status of the transfers capability of the account, or whether your platform can transfer funds to the account. */ transfers?: "active" | "inactive" | "pending"; - } & { [key: string]: any }; + }; account_capability_requirements: { /** The date the fields in `currently_due` must be collected by to keep the capability enabled for the account. */ current_deadline?: number | null; @@ -1597,24 +1595,24 @@ export interface components { past_due: string[]; /** 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[]; - } & { [key: string]: any }; + }; account_card_payments_settings: { decline_on?: components["schemas"]["account_decline_charge_on"]; /** 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; - } & { [key: string]: any }; + }; account_dashboard_settings: { /** The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts. */ display_name?: string | null; /** 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; - } & { [key: string]: any }; + }; account_decline_charge_on: { /** 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; /** 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; - } & { [key: string]: any }; + }; /** * Account Links are the means by which a Connect platform grants a connected account permission to access * Stripe-hosted applications, such as Connect Onboarding. @@ -1630,7 +1628,7 @@ export interface components { object: "account_link"; /** The URL for the account link. */ url: string; - } & { [key: string]: any }; + }; account_payments_settings: { /** 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; @@ -1638,14 +1636,14 @@ export interface components { statement_descriptor_kana?: string | null; /** 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; - } & { [key: string]: any }; + }; account_payout_settings: { /** 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: components["schemas"]["transfer_schedule"]; /** 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; - } & { [key: string]: any }; + }; account_requirements: { /** 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 | null; @@ -1661,7 +1659,7 @@ export interface components { past_due?: string[] | null; /** 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[] | null; - } & { [key: string]: any }; + }; account_requirements_error: { /** The code for the type of error. */ code: @@ -1707,14 +1705,14 @@ export interface components { reason: string; /** The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. */ requirement: string; - } & { [key: string]: any }; + }; account_settings: { branding: components["schemas"]["account_branding_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"]; - } & { [key: string]: any }; + }; account_tos_acceptance: { /** The Unix timestamp marking when the Stripe Services Agreement was accepted by the account representative */ date?: number | null; @@ -1722,7 +1720,7 @@ export interface components { ip?: string | null; /** The user agent of the browser from which the Stripe Services Agreement was accepted by the account representative */ user_agent?: string | null; - } & { [key: string]: any }; + }; address: { /** City, district, suburb, town, or village. */ city?: string | null; @@ -1736,15 +1734,15 @@ export interface components { postal_code?: string | null; /** State, county, province, or region. */ state?: string | null; - } & { [key: string]: any }; + }; alipay_account: { /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** The ID of the customer associated with this Alipay Account. */ customer?: - | ((Partial & + | (Partial & Partial & - Partial) & { [key: string]: any }) + Partial) | null; /** Uniquely identifies the account and will be the same across all Alipay account objects that are linked to the same Alipay account. */ fingerprint: string; @@ -1766,7 +1764,7 @@ export interface components { used: boolean; /** The username for the Alipay account. */ username: string; - } & { [key: string]: any }; + }; api_errors: { /** For card errors, the ID of the failed charge. */ charge?: string; @@ -1784,9 +1782,9 @@ export interface components { payment_method?: components["schemas"]["payment_method"]; setup_intent?: components["schemas"]["setup_intent"]; /** The source object for errors returned on a request involving a source. */ - source?: (Partial & + source?: Partial & Partial & - Partial) & { [key: string]: any }; + Partial; /** 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` */ type: | "api_connection_error" @@ -1796,7 +1794,7 @@ export interface components { | "idempotency_error" | "invalid_request_error" | "rate_limit_error"; - } & { [key: string]: any }; + }; apple_pay_domain: { /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; @@ -1807,7 +1805,7 @@ export interface components { livemode: boolean; /** String representing the object's type. Objects of the same type share the same value. */ object: "apple_pay_domain"; - } & { [key: string]: any }; + }; application: { /** Unique identifier for the object. */ id: string; @@ -1815,22 +1813,20 @@ export interface components { name?: string | null; /** String representing the object's type. Objects of the same type share the same value. */ object: "application"; - } & { [key: string]: any }; + }; application_fee: { /** ID of the Stripe account this fee was taken from. */ - account: (Partial & Partial) & { [key: string]: any }; + account: Partial & Partial; /** Amount earned, in %s. */ amount: number; /** Amount in %s refunded (can be less than the amount attribute on the fee if a partial refund was issued) */ amount_refunded: number; /** ID of the Connect application that earned the fee. */ - application: (Partial & Partial) & { [key: string]: any }; + application: Partial & Partial; /** Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). */ - balance_transaction?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + balance_transaction?: (Partial & Partial) | null; /** ID of the charge that the application fee was taken from. */ - charge: (Partial & Partial) & { [key: string]: any }; + charge: Partial & Partial; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** 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). */ @@ -1842,9 +1838,7 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "application_fee"; /** ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter. */ - originating_transaction?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + originating_transaction?: (Partial & Partial) | null; /** Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. */ refunded: boolean; /** A list of refunds that have been applied to the fee. */ @@ -1857,8 +1851,8 @@ export interface components { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** * This is an object representing your Stripe balance. You can retrieve it to see * the balance currently on your Stripe account. @@ -1883,14 +1877,14 @@ export interface components { object: "balance"; /** 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"][]; - } & { [key: string]: any }; + }; balance_amount: { /** Balance amount. */ amount: number; /** 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"]; - } & { [key: string]: any }; + }; balance_amount_by_source_type: { /** Amount for bank account. */ bank_account?: number; @@ -1898,7 +1892,7 @@ export interface components { card?: number; /** Amount for FPX. */ fpx?: number; - } & { [key: string]: any }; + }; /** * 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. @@ -1932,7 +1926,7 @@ export interface components { reporting_category: string; /** The Stripe object to which this transaction is related. */ source?: - | ((Partial & + | (Partial & Partial & Partial & Partial & @@ -1947,7 +1941,7 @@ export interface components { Partial & Partial & Partial & - Partial) & { [key: string]: any }) + Partial) | null; /** If the transaction's net funds are available in the Stripe balance yet. Either `available` or `pending`. */ status: string; @@ -1982,7 +1976,7 @@ export interface components { | "transfer_cancel" | "transfer_failure" | "transfer_refund"; - } & { [key: string]: any }; + }; /** * These bank accounts are payment methods on `Customer` objects. * @@ -1994,7 +1988,7 @@ export interface components { */ bank_account: { /** The ID of the account that the bank account is associated with. */ - account?: ((Partial & Partial) & { [key: string]: any }) | null; + account?: (Partial & Partial) | null; /** The name of the person or business that owns the bank account. */ account_holder_name?: string | null; /** The type of entity that holds the account. This can be either `individual` or `company`. */ @@ -2007,9 +2001,9 @@ export interface components { currency: string; /** The ID of the customer that the bank account is associated with. */ customer?: - | ((Partial & + | (Partial & Partial & - Partial) & { [key: string]: any }) + Partial) | null; /** Whether this bank account is the default external account for its currency. */ default_for_currency?: boolean | null; @@ -2031,17 +2025,17 @@ export interface components { * 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; - } & { [key: string]: any }; + }; billing_details: { /** Billing address. */ - address?: (Partial & { [key: string]: any }) | null; + address?: Partial | null; /** Email address. */ email?: string | null; /** Full name. */ name?: string | null; /** Billing phone number (including extension). */ phone?: string | null; - } & { [key: string]: any }; + }; /** * A Session describes the instantiation of the Self-serve Portal for * a particular customer. By visiting the Self-serve Portal's URL, the customer @@ -2066,7 +2060,7 @@ export interface components { return_url: string; /** The short-lived URL of the session giving customers access to the self-serve portal. */ url: string; - } & { [key: string]: any }; + }; bitcoin_receiver: { /** True when this bitcoin receiver has received a non-zero amount of bitcoin. */ active: boolean; @@ -2116,12 +2110,12 @@ export interface components { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; /** This receiver contains uncaptured funds that can be used for a payment or refunded. */ uncaptured_funds: boolean; /** Indicate if this source is used for payment. */ used_for_payment?: boolean | null; - } & { [key: string]: any }; + }; bitcoin_transaction: { /** The amount of `currency` that the transaction was converted to in real-time. */ amount: number; @@ -2137,7 +2131,7 @@ export interface components { object: "bitcoin_transaction"; /** The receiver to which this transaction was sent. */ receiver: string; - } & { [key: string]: any }; + }; /** * This is an object representing a capability for a Stripe account. * @@ -2145,7 +2139,7 @@ export interface components { */ capability: { /** The account for which the capability enables functionality. */ - account: (Partial & Partial) & { [key: string]: any }; + account: Partial & Partial; /** The identifier for the capability. */ id: string; /** String representing the object's type. Objects of the same type share the same value. */ @@ -2157,7 +2151,7 @@ export interface components { requirements?: components["schemas"]["account_capability_requirements"]; /** The status of the capability. Can be `active`, `inactive`, `pending`, or `unrequested`. */ status: "active" | "disabled" | "inactive" | "pending" | "unrequested"; - } & { [key: string]: any }; + }; /** * 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 @@ -2167,7 +2161,7 @@ export interface components { */ card: { /** 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?: ((Partial & Partial) & { [key: string]: any }) | null; + account?: (Partial & Partial) | null; /** City/District/Suburb/Town/Village. */ address_city?: string | null; /** Billing address country, if provided when creating card. */ @@ -2193,9 +2187,9 @@ export interface components { currency?: string | null; /** 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?: - | ((Partial & + | (Partial & Partial & - Partial) & { [key: string]: any }) + Partial) | null; /** If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. */ cvc_check?: string | null; @@ -2222,10 +2216,10 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "card"; /** 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?: ((Partial & Partial) & { [key: string]: any }) | null; + recipient?: (Partial & Partial) | null; /** 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 | null; - } & { [key: string]: any }; + }; card_mandate_payment_method_details: { [key: string]: any }; /** * To charge a credit or a debit card, you create a `Charge` object. You can @@ -2240,17 +2234,13 @@ export interface components { /** Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued). */ amount_refunded: number; /** ID of the Connect application that created the charge. */ - application?: ((Partial & Partial) & { [key: string]: any }) | null; + application?: (Partial & Partial) | null; /** 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?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + application_fee?: (Partial & Partial) | null; /** 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 | null; /** ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). */ - balance_transaction?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + balance_transaction?: (Partial & Partial) | null; billing_details: components["schemas"]["billing_details"]; /** 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; @@ -2262,9 +2252,9 @@ export interface components { currency: string; /** ID of the customer this charge is for if one exists. */ customer?: - | ((Partial & + | (Partial & Partial & - Partial) & { [key: string]: any }) + Partial) | null; /** An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string | null; @@ -2275,11 +2265,11 @@ export interface components { /** Message to user further explaining reason for charge failure if available. */ failure_message?: string | null; /** Information on fraud assessments for the charge. */ - fraud_details?: (Partial & { [key: string]: any }) | null; + fraud_details?: Partial | null; /** Unique identifier for the object. */ id: string; /** ID of the invoice this charge is for if one exists. */ - invoice?: ((Partial & Partial) & { [key: string]: any }) | null; + invoice?: (Partial & Partial) | null; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -2287,23 +2277,19 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "charge"; /** 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?: ((Partial & Partial) & { [key: string]: any }) | null; + on_behalf_of?: (Partial & Partial) | null; /** ID of the order this charge is for if one exists. */ - order?: ((Partial & Partial) & { [key: string]: any }) | null; + order?: (Partial & Partial) | null; /** Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. */ - outcome?: (Partial & { [key: string]: any }) | null; + outcome?: Partial | null; /** `true` if the charge succeeded, or was successfully authorized for later capture. */ paid: boolean; /** ID of the PaymentIntent associated with this charge, if one exists. */ - payment_intent?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + payment_intent?: (Partial & Partial) | null; /** ID of the payment method used in this charge. */ payment_method?: string | null; /** Details about the payment method at the time of the transaction. */ - payment_method_details?: - | (Partial & { [key: string]: any }) - | null; + payment_method_details?: Partial | null; /** This is the email address that the receipt for this charge was sent to. */ receipt_email?: string | null; /** 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. */ @@ -2322,15 +2308,13 @@ export interface components { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; /** ID of the review associated with this charge if one exists. */ - review?: ((Partial & Partial) & { [key: string]: any }) | null; + review?: (Partial & Partial) | null; /** Shipping information for the charge. */ - shipping?: (Partial & { [key: string]: any }) | null; + shipping?: Partial | null; /** 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?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + source_transfer?: (Partial & Partial) | null; /** 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; /** 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. */ @@ -2338,18 +2322,18 @@ export interface components { /** The status of the payment is either `succeeded`, `pending`, or `failed`. */ status: string; /** ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). */ - transfer?: (Partial & Partial) & { [key: string]: any }; + transfer?: Partial & Partial; /** 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?: (Partial & { [key: string]: any }) | null; + transfer_data?: Partial | null; /** 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; - } & { [key: string]: any }; + }; charge_fraud_details: { /** Assessments from Stripe. If set, the value is `fraudulent`. */ stripe_report?: string; /** Assessments reported by you. If set, possible values of are `safe` and `fraudulent`. */ user_report?: string; - } & { [key: string]: any }; + }; charge_outcome: { /** 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; @@ -2360,18 +2344,18 @@ export interface components { /** 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; /** The ID of the Radar rule that matched the payment, if applicable. */ - rule?: (Partial & Partial) & { [key: string]: any }; + rule?: Partial & Partial; /** 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; /** 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; - } & { [key: string]: any }; + }; charge_transfer_data: { /** The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. */ amount?: number | null; /** ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. */ - destination: (Partial & Partial) & { [key: string]: any }; - } & { [key: string]: any }; + destination: Partial & Partial; + }; /** * 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). @@ -2408,7 +2392,7 @@ export interface components { * during the session unless an existing customer was provided when * the session was created. */ - customer?: ((Partial & Partial) & { [key: string]: any }) | null; + customer?: (Partial & Partial) | null; /** * 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. @@ -2455,26 +2439,20 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "checkout.session"; /** The ID of the PaymentIntent for Checkout Sessions in `payment` mode. */ - payment_intent?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + payment_intent?: (Partial & Partial) | null; /** * A list of the types of payment methods (e.g. card) this Checkout * Session is allowed to accept. */ payment_method_types: string[]; /** The ID of the SetupIntent for Checkout Sessions in `setup` mode. */ - setup_intent?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + setup_intent?: (Partial & Partial) | null; /** Shipping information for this Checkout Session. */ - shipping?: (Partial & { [key: string]: any }) | null; + shipping?: Partial | null; /** When set, provides configuration for Checkout to collect a shipping address from a customer. */ - shipping_address_collection?: - | (Partial & { - [key: string]: any; - }) - | null; + shipping_address_collection?: Partial< + components["schemas"]["payment_pages_payment_page_resources_shipping_address_collection"] + > | null; /** * 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 @@ -2483,15 +2461,13 @@ export interface components { */ submit_type?: ("auto" | "book" | "donate" | "pay") | null; /** The ID of the subscription for Checkout Sessions in `subscription` mode. */ - subscription?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + subscription?: (Partial & Partial) | null; /** * The URL the customer will be directed to after the payment or * subscription creation is successful. */ success_url: string; - } & { [key: string]: any }; + }; checkout_session_custom_display_item_description: { /** The description of the line item. */ description?: string | null; @@ -2499,7 +2475,7 @@ export interface components { images?: string[] | null; /** The name of the line item. */ name: string; - } & { [key: string]: any }; + }; checkout_session_display_item: { /** Amount for the display item. */ amount?: number; @@ -2512,21 +2488,21 @@ export interface components { sku?: components["schemas"]["sku"]; /** The type of display item. One of `custom`, `plan` or `sku` */ type?: string; - } & { [key: string]: any }; + }; connect_collection_transfer: { /** Amount transferred, in %s. */ amount: number; /** 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; /** ID of the account that funds are being collected for. */ - destination: (Partial & Partial) & { [key: string]: any }; + destination: Partial & Partial; /** Unique identifier for the object. */ id: string; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** String representing the object's type. Objects of the same type share the same value. */ object: "connect_collection_transfer"; - } & { [key: string]: any }; + }; /** * Stripe needs to collect certain pieces of information about each account * created. These requirements can differ depending on the account's country. The @@ -2551,17 +2527,17 @@ export interface components { /** Countries that can accept transfers from the specified country. */ supported_transfer_countries: string[]; verification_fields: components["schemas"]["country_spec_verification_fields"]; - } & { [key: string]: any }; + }; country_spec_verification_field_details: { /** Additional fields which are only required for some users. */ additional: string[]; /** Fields which every account must eventually provide. */ minimum: string[]; - } & { [key: string]: any }; + }; country_spec_verification_fields: { company: components["schemas"]["country_spec_verification_field_details"]; individual: components["schemas"]["country_spec_verification_field_details"]; - } & { [key: string]: any }; + }; /** * 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 @@ -2598,7 +2574,7 @@ export interface components { times_redeemed: number; /** Taking account of the above properties, whether this coupon can still be applied to a customer. */ valid: boolean; - } & { [key: string]: any }; + }; /** * Issue a credit note to adjust an invoice's amount after the invoice is finalized. * @@ -2612,17 +2588,17 @@ export interface components { /** 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; /** ID of the customer. */ - customer: (Partial & Partial) & { [key: string]: any }; + customer: Partial & Partial; /** Customer balance transaction related to this credit note. */ customer_balance_transaction?: - | ((Partial & Partial) & { [key: string]: any }) + | (Partial & Partial) | null; /** The integer amount in **%s** representing the amount of the discount that was credited. */ discount_amount: number; /** Unique identifier for the object. */ id: string; /** ID of the invoice. */ - invoice: (Partial & Partial) & { [key: string]: any }; + invoice: Partial & Partial; /** Line items that make up the credit note */ lines: { /** Details about each object. */ @@ -2633,7 +2609,7 @@ export interface components { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** Customer-facing text that appears on the credit note PDF. */ @@ -2651,7 +2627,7 @@ export interface components { /** Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` */ reason?: ("duplicate" | "fraudulent" | "order_change" | "product_unsatisfactory") | null; /** Refund related to this credit note. */ - refund?: ((Partial & Partial) & { [key: string]: any }) | null; + refund?: (Partial & Partial) | null; /** 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). */ status: "issued" | "void"; /** The integer amount in **%s** representing the amount of the credit note, excluding tax and discount. */ @@ -2664,7 +2640,7 @@ export interface components { type: "post_payment" | "pre_payment"; /** The time that the credit note was voided. */ voided_at?: number | null; - } & { [key: string]: any }; + }; credit_note_line_item: { /** The integer amount in **%s** representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. */ amount: number; @@ -2692,15 +2668,15 @@ export interface components { unit_amount?: number | null; /** Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. */ unit_amount_decimal?: string | null; - } & { [key: string]: any }; + }; credit_note_tax_amount: { /** The amount, in %s, of the tax. */ amount: number; /** Whether this tax amount is inclusive or exclusive. */ inclusive: boolean; /** The tax rate that was applied to get this tax amount. */ - tax_rate: (Partial & Partial) & { [key: string]: any }; - } & { [key: string]: any }; + tax_rate: Partial & Partial; + }; /** * `Customer` objects allow you to perform recurring charges, and to track * multiple charges, that are associated with the same customer. The API allows @@ -2711,7 +2687,7 @@ export interface components { */ customer: { /** The customer's address. */ - address?: (Partial & { [key: string]: any }) | null; + address?: Partial | null; /** 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; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ @@ -2724,19 +2700,19 @@ export interface components { * 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?: - | ((Partial & + | (Partial & Partial & Partial & Partial & Partial & - Partial) & { [key: string]: any }) + Partial) | null; /** 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 | null; /** An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string | null; /** Describes the current discount active on the customer, if there is one. */ - discount?: (Partial & { [key: string]: any }) | null; + discount?: Partial | null; /** The customer's email address. */ email?: string | null; /** Unique identifier for the object. */ @@ -2759,22 +2735,22 @@ export interface components { /** The customer's preferred locales (languages), ordered by preference. */ preferred_locales?: string[] | null; /** Mailing and shipping address for the customer. Appears on invoices emailed to this customer. */ - shipping?: (Partial & { [key: string]: any }) | null; + shipping?: Partial | null; /** The customer's payment sources, if any. */ sources: { /** Details about each object. */ - data: ((Partial & + data: (Partial & Partial & Partial & Partial & - Partial) & { [key: string]: any })[]; + Partial)[]; /** True if this list has another page of items after this one that can be fetched. */ has_more: boolean; /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; /** The customer's current subscriptions, if any. */ subscriptions?: { /** Details about each object. */ @@ -2785,7 +2761,7 @@ export interface components { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; /** 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"**. */ tax_exempt?: ("exempt" | "none" | "reverse") | null; /** The customer's tax IDs. */ @@ -2798,8 +2774,8 @@ export interface components { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; customer_acceptance: { /** The time at which the customer accepted the Mandate. */ accepted_at?: number | null; @@ -2807,7 +2783,7 @@ export interface components { online?: components["schemas"]["online_acceptance"]; /** The type of customer acceptance information included with the Mandate. One of `online` or `offline`. */ type: "offline" | "online"; - } & { [key: string]: any }; + }; /** * 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. @@ -2822,11 +2798,11 @@ export interface components { /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** The ID of the credit note (if any) related to the transaction. */ - credit_note?: ((Partial & Partial) & { [key: string]: any }) | null; + credit_note?: (Partial & Partial) | null; /** 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; /** The ID of the customer the transaction belongs to. */ - customer: (Partial & Partial) & { [key: string]: any }; + customer: Partial & Partial; /** An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string | null; /** 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. */ @@ -2834,7 +2810,7 @@ export interface components { /** Unique identifier for the object. */ id: string; /** The ID of the invoice (if any) related to the transaction. */ - invoice?: ((Partial & Partial) & { [key: string]: any }) | null; + invoice?: (Partial & Partial) | null; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -2852,7 +2828,7 @@ export interface components { | "migration" | "unapplied_from_invoice" | "unspent_receiver_credit"; - } & { [key: string]: any }; + }; deleted_account: { /** Always true for a deleted object */ deleted: true; @@ -2860,7 +2836,7 @@ export interface components { id: string; /** String representing the object's type. Objects of the same type share the same value. */ object: "account"; - } & { [key: string]: any }; + }; deleted_alipay_account: { /** Always true for a deleted object */ deleted: true; @@ -2868,7 +2844,7 @@ export interface components { id: string; /** String representing the object's type. Objects of the same type share the same value. */ object: "alipay_account"; - } & { [key: string]: any }; + }; deleted_apple_pay_domain: { /** Always true for a deleted object */ deleted: true; @@ -2876,7 +2852,7 @@ export interface components { id: string; /** String representing the object's type. Objects of the same type share the same value. */ object: "apple_pay_domain"; - } & { [key: string]: any }; + }; deleted_bank_account: { /** Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ currency?: string | null; @@ -2886,7 +2862,7 @@ export interface components { id: string; /** String representing the object's type. Objects of the same type share the same value. */ object: "bank_account"; - } & { [key: string]: any }; + }; deleted_bitcoin_receiver: { /** Always true for a deleted object */ deleted: true; @@ -2894,7 +2870,7 @@ export interface components { id: string; /** String representing the object's type. Objects of the same type share the same value. */ object: "bitcoin_receiver"; - } & { [key: string]: any }; + }; deleted_card: { /** Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ currency?: string | null; @@ -2904,7 +2880,7 @@ export interface components { id: string; /** String representing the object's type. Objects of the same type share the same value. */ object: "card"; - } & { [key: string]: any }; + }; deleted_coupon: { /** Always true for a deleted object */ deleted: true; @@ -2912,7 +2888,7 @@ export interface components { id: string; /** String representing the object's type. Objects of the same type share the same value. */ object: "coupon"; - } & { [key: string]: any }; + }; deleted_customer: { /** Always true for a deleted object */ deleted: true; @@ -2920,15 +2896,15 @@ export interface components { id: string; /** String representing the object's type. Objects of the same type share the same value. */ object: "customer"; - } & { [key: string]: any }; + }; deleted_discount: { /** Always true for a deleted object */ deleted: true; /** String representing the object's type. Objects of the same type share the same value. */ object: "discount"; - } & { [key: string]: any }; - deleted_external_account: (Partial & - Partial) & { [key: string]: any }; + }; + deleted_external_account: Partial & + Partial; deleted_invoice: { /** Always true for a deleted object */ deleted: true; @@ -2936,7 +2912,7 @@ export interface components { id: string; /** String representing the object's type. Objects of the same type share the same value. */ object: "invoice"; - } & { [key: string]: any }; + }; deleted_invoiceitem: { /** Always true for a deleted object */ deleted: true; @@ -2944,11 +2920,11 @@ export interface components { id: string; /** String representing the object's type. Objects of the same type share the same value. */ object: "invoiceitem"; - } & { [key: string]: any }; - deleted_payment_source: (Partial & + }; + deleted_payment_source: Partial & Partial & Partial & - Partial) & { [key: string]: any }; + Partial; deleted_person: { /** Always true for a deleted object */ deleted: true; @@ -2956,7 +2932,7 @@ export interface components { id: string; /** String representing the object's type. Objects of the same type share the same value. */ object: "person"; - } & { [key: string]: any }; + }; deleted_plan: { /** Always true for a deleted object */ deleted: true; @@ -2964,7 +2940,7 @@ export interface components { id: string; /** String representing the object's type. Objects of the same type share the same value. */ object: "plan"; - } & { [key: string]: any }; + }; deleted_product: { /** Always true for a deleted object */ deleted: true; @@ -2972,7 +2948,7 @@ export interface components { id: string; /** String representing the object's type. Objects of the same type share the same value. */ object: "product"; - } & { [key: string]: any }; + }; "deleted_radar.value_list": { /** Always true for a deleted object */ deleted: true; @@ -2980,7 +2956,7 @@ export interface components { id: string; /** String representing the object's type. Objects of the same type share the same value. */ object: "radar.value_list"; - } & { [key: string]: any }; + }; "deleted_radar.value_list_item": { /** Always true for a deleted object */ deleted: true; @@ -2988,7 +2964,7 @@ export interface components { id: string; /** String representing the object's type. Objects of the same type share the same value. */ object: "radar.value_list_item"; - } & { [key: string]: any }; + }; deleted_recipient: { /** Always true for a deleted object */ deleted: true; @@ -2996,7 +2972,7 @@ export interface components { id: string; /** String representing the object's type. Objects of the same type share the same value. */ object: "recipient"; - } & { [key: string]: any }; + }; deleted_sku: { /** Always true for a deleted object */ deleted: true; @@ -3004,7 +2980,7 @@ export interface components { id: string; /** String representing the object's type. Objects of the same type share the same value. */ object: "sku"; - } & { [key: string]: any }; + }; deleted_subscription_item: { /** Always true for a deleted object */ deleted: true; @@ -3012,7 +2988,7 @@ export interface components { id: string; /** String representing the object's type. Objects of the same type share the same value. */ object: "subscription_item"; - } & { [key: string]: any }; + }; deleted_tax_id: { /** Always true for a deleted object */ deleted: true; @@ -3020,7 +2996,7 @@ export interface components { id: string; /** String representing the object's type. Objects of the same type share the same value. */ object: "tax_id"; - } & { [key: string]: any }; + }; "deleted_terminal.location": { /** Always true for a deleted object */ deleted: true; @@ -3028,7 +3004,7 @@ export interface components { id: string; /** String representing the object's type. Objects of the same type share the same value. */ object: "terminal.location"; - } & { [key: string]: any }; + }; "deleted_terminal.reader": { /** Always true for a deleted object */ deleted: true; @@ -3036,7 +3012,7 @@ export interface components { id: string; /** String representing the object's type. Objects of the same type share the same value. */ object: "terminal.reader"; - } & { [key: string]: any }; + }; deleted_webhook_endpoint: { /** Always true for a deleted object */ deleted: true; @@ -3044,7 +3020,7 @@ export interface components { id: string; /** String representing the object's type. Objects of the same type share the same value. */ object: "webhook_endpoint"; - } & { [key: string]: any }; + }; delivery_estimate: { /** If `type` is `"exact"`, `date` will be the expected delivery date in the format YYYY-MM-DD. */ date?: string; @@ -3054,7 +3030,7 @@ export interface components { latest?: string; /** The type of estimate. Must be either `"range"` or `"exact"`. */ type: string; - } & { [key: string]: any }; + }; /** * A discount represents the actual application of a coupon to a particular * customer. It contains information about when the discount began and when it @@ -3066,9 +3042,9 @@ export interface components { coupon: components["schemas"]["coupon"]; /** The ID of the customer associated with this discount. */ customer?: - | ((Partial & + | (Partial & Partial & - Partial) & { [key: string]: any }) + Partial) | null; /** 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; @@ -3078,7 +3054,7 @@ export interface components { start: number; /** The subscription that this coupon is applied to, if it is applied to a particular subscription. */ subscription?: string | null; - } & { [key: string]: any }; + }; /** * 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 @@ -3094,7 +3070,7 @@ export interface components { /** 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"][]; /** ID of the charge that was disputed. */ - charge: (Partial & Partial) & { [key: string]: any }; + charge: Partial & Partial; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** 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). */ @@ -3112,9 +3088,7 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "dispute"; /** ID of the PaymentIntent that was disputed. */ - payment_intent?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + payment_intent?: (Partial & Partial) | null; /** 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; /** Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `charge_refunded`, `won`, or `lost`. */ @@ -3127,24 +3101,20 @@ export interface components { | "warning_needs_response" | "warning_under_review" | "won"; - } & { [key: string]: any }; + }; dispute_evidence: { /** 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; /** The billing address provided by the customer. */ billing_address?: string | null; /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. */ - cancellation_policy?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + cancellation_policy?: (Partial & Partial) | null; /** An explanation of how and when the customer was shown your refund policy prior to purchase. */ cancellation_policy_disclosure?: string | null; /** A justification for why the customer's subscription was not canceled. */ cancellation_rebuttal?: string | null; /** (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?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + customer_communication?: (Partial & Partial) | null; /** The email address of the customer. */ customer_email_address?: string | null; /** The name of the customer. */ @@ -3152,11 +3122,9 @@ export interface components { /** The IP address that the customer used when making the purchase. */ customer_purchase_ip?: string | null; /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. */ - customer_signature?: ((Partial & Partial) & { [key: string]: any }) | null; + customer_signature?: (Partial & Partial) | null; /** (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?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + duplicate_charge_documentation?: (Partial & Partial) | null; /** An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. */ duplicate_charge_explanation?: string | null; /** The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. */ @@ -3164,9 +3132,9 @@ export interface components { /** A description of the product or service that was sold. */ product_description?: string | null; /** (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?: ((Partial & Partial) & { [key: string]: any }) | null; + receipt?: (Partial & Partial) | null; /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. */ - refund_policy?: ((Partial & Partial) & { [key: string]: any }) | null; + refund_policy?: (Partial & Partial) | null; /** Documentation demonstrating that the customer was shown your refund policy prior to purchase. */ refund_policy_disclosure?: string | null; /** A justification for why the customer is not entitled to a refund. */ @@ -3174,9 +3142,7 @@ export interface components { /** The date on which the customer received or began receiving the purchased service, in a clear human-readable format. */ service_date?: string | null; /** (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?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + service_documentation?: (Partial & Partial) | null; /** The address to which a physical product was shipped. You should try to include as complete address information as possible. */ shipping_address?: string | null; /** 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. */ @@ -3184,16 +3150,14 @@ export interface components { /** The date on which a physical product began its route to the shipping address, in a clear human-readable format. */ shipping_date?: string | null; /** (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?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + shipping_documentation?: (Partial & Partial) | null; /** 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; /** (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. */ - uncategorized_file?: ((Partial & Partial) & { [key: string]: any }) | null; + uncategorized_file?: (Partial & Partial) | null; /** Any additional evidence or statements. */ uncategorized_text?: string | null; - } & { [key: string]: any }; + }; dispute_evidence_details: { /** 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; @@ -3203,7 +3167,7 @@ export interface components { past_due: boolean; /** The number of times evidence has been submitted. Typically, you may only submit evidence once. */ submission_count: number; - } & { [key: string]: any }; + }; ephemeral_key: { /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; @@ -3217,11 +3181,11 @@ export interface components { object: "ephemeral_key"; /** The key's secret. You can use this value to make authorized requests to the Stripe API. */ secret?: string; - } & { [key: string]: any }; + }; /** An error response from the Stripe API */ error: { error: components["schemas"]["api_errors"]; - } & { [key: string]: any }; + }; /** * 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` @@ -3270,10 +3234,10 @@ export interface components { /** 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; /** Information on the API request that instigated the event. */ - request?: (Partial & { [key: string]: any }) | null; + request?: Partial | null; /** Description of the event (e.g., `invoice.created` or `charge.refunded`). */ type: string; - } & { [key: string]: any }; + }; /** * `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 @@ -3294,10 +3258,8 @@ export interface components { object: "exchange_rate"; /** 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 }; - } & { [key: string]: any }; - external_account: (Partial & Partial) & { - [key: string]: any; }; + external_account: Partial & Partial; fee: { /** Amount of the fee, in cents. */ amount: number; @@ -3309,7 +3271,7 @@ export interface components { description?: string | null; /** Type of the fee, one of: `application_fee`, `stripe_fee` or `tax`. */ type: string; - } & { [key: string]: any }; + }; /** * `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 @@ -3321,22 +3283,20 @@ export interface components { /** Amount, in %s. */ amount: number; /** Balance transaction that describes the impact on your account balance. */ - balance_transaction?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + balance_transaction?: (Partial & Partial) | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** 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; /** ID of the application fee that was refunded. */ - fee: (Partial & Partial) & { [key: string]: any }; + fee: Partial & Partial; /** Unique identifier for the object. */ id: 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. */ metadata: { [key: string]: string }; /** String representing the object's type. Objects of the same type share the same value. */ object: "fee_refund"; - } & { [key: string]: any }; + }; /** * 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) @@ -3354,18 +3314,16 @@ export interface components { /** Unique identifier for the object. */ id: string; /** A list of [file links](https://stripe.com/docs/api#file_links) that point at this file. */ - links?: - | ({ - /** Details about each object. */ - data: components["schemas"]["file_link"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; - } & { [key: string]: any }) - | null; + links?: { + /** Details about each object. */ + data: components["schemas"]["file_link"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } | null; /** String representing the object's type. Objects of the same type share the same value. */ object: "file"; /** 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`. */ @@ -3378,7 +3336,7 @@ export interface components { type?: string | null; /** The URL from which the file can be downloaded using your live secret API key. */ url?: string | null; - } & { [key: string]: any }; + }; /** * 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 @@ -3392,7 +3350,7 @@ export interface components { /** Time at which the link expires. */ expires_at?: number | null; /** The file object this link points to. */ - file: (Partial & Partial) & { [key: string]: any }; + file: Partial & Partial; /** Unique identifier for the object. */ id: string; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -3403,7 +3361,7 @@ export interface components { object: "file_link"; /** The publicly accessible URL to download the file. */ url?: string | null; - } & { [key: string]: any }; + }; financial_reporting_finance_report_run_run_parameters: { /** The set of output columns requested for inclusion in the report run. */ columns?: string[]; @@ -3421,7 +3379,7 @@ export interface components { reporting_category?: string; /** 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; - } & { [key: string]: any }; + }; inventory: { /** The count of inventory available. Will be present if and only if `type` is `finite`. */ quantity?: number | null; @@ -3429,7 +3387,7 @@ export interface components { type: string; /** 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; - } & { [key: string]: any }; + }; /** * Invoices are statements of amounts owed by a customer, and are either * generated one-off, or generated periodically from a subscription. @@ -3497,7 +3455,7 @@ export interface components { ) | null; /** ID of the latest charge generated for this invoice, if any. */ - charge?: ((Partial & Partial) & { [key: string]: any }) | null; + charge?: (Partial & Partial) | null; /** 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. */ collection_method?: ("charge_automatically" | "send_invoice") | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ @@ -3507,11 +3465,11 @@ export interface components { /** Custom fields displayed on the invoice. */ custom_fields?: components["schemas"]["invoice_setting_custom_field"][] | null; /** The ID of the customer who will be billed. */ - customer: (Partial & + customer: Partial & Partial & - Partial) & { [key: string]: any }; + Partial; /** 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?: (Partial & { [key: string]: any }) | null; + customer_address?: Partial | null; /** 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; /** 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. */ @@ -3519,30 +3477,28 @@ export interface components { /** 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; /** 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?: (Partial & { [key: string]: any }) | null; + customer_shipping?: Partial | null; /** 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. */ customer_tax_exempt?: ("exempt" | "none" | "reverse") | null; /** 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; /** 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?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + default_payment_method?: (Partial & Partial) | null; /** 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?: - | ((Partial & + | (Partial & Partial & Partial & Partial & Partial & - Partial) & { [key: string]: any }) + Partial) | null; /** The tax rates applied to this invoice, if any. */ default_tax_rates?: components["schemas"]["tax_rate"][] | null; /** An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ description?: string | null; /** Describes the current discount applied to this invoice, if there is one. */ - discount?: (Partial & { [key: string]: any }) | null; + discount?: Partial | null; /** 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; /** 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. */ @@ -3565,7 +3521,7 @@ export interface components { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -3579,9 +3535,7 @@ export interface components { /** 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; /** 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?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + payment_intent?: (Partial & Partial) | null; /** End of the usage period during which invoice items were added to this invoice. */ period_end: number; /** Start of the usage period during which invoice items were added to this invoice. */ @@ -3600,9 +3554,7 @@ export interface components { status?: ("deleted" | "draft" | "open" | "paid" | "uncollectible" | "void") | null; status_transitions: components["schemas"]["invoices_status_transitions"]; /** The subscription that this invoice was prepared for, if any. */ - subscription?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + subscription?: (Partial & Partial) | null; /** Only set for upcoming invoices that preview prorations. The time used to calculate prorations. */ subscription_proration_date?: number; /** Total of all subscriptions, invoice items, and prorations on the invoice before any discount or tax is applied. */ @@ -3618,53 +3570,51 @@ export interface components { total_tax_amounts?: components["schemas"]["invoice_tax_amount"][] | null; /** 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; - } & { [key: string]: any }; + }; invoice_item_threshold_reason: { /** The IDs of the line items that triggered the threshold invoice. */ line_item_ids: string[]; /** The quantity threshold boundary that applied to the given line item. */ usage_gte: number; - } & { [key: string]: any }; + }; invoice_line_item_period: { /** End of the line item's billing period */ end: number; /** Start of the line item's billing period */ start: number; - } & { [key: string]: any }; + }; invoice_setting_custom_field: { /** The name of the custom field. */ name: string; /** The value of the custom field. */ value: string; - } & { [key: string]: any }; + }; invoice_setting_customer_setting: { /** Default custom fields to be displayed on invoices for this customer. */ custom_fields?: components["schemas"]["invoice_setting_custom_field"][] | null; /** 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?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + default_payment_method?: (Partial & Partial) | null; /** Default footer to be displayed on invoices for this customer. */ footer?: string | null; - } & { [key: string]: any }; + }; invoice_setting_subscription_schedule_setting: { /** 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; - } & { [key: string]: any }; + }; invoice_tax_amount: { /** The amount, in %s, of the tax. */ amount: number; /** Whether this tax amount is inclusive or exclusive. */ inclusive: boolean; /** The tax rate that was applied to get this tax amount. */ - tax_rate: (Partial & Partial) & { [key: string]: any }; - } & { [key: string]: any }; + tax_rate: Partial & Partial; + }; invoice_threshold_reason: { /** The total invoice amount threshold boundary if it triggered the threshold invoice. */ amount_gte?: number | null; /** Indicates which line items triggered a threshold invoice. */ item_reasons: components["schemas"]["invoice_item_threshold_reason"][]; - } & { [key: string]: any }; + }; /** * 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 @@ -3680,9 +3630,9 @@ export interface components { /** 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; /** The ID of the customer who will be billed when this invoice item is billed. */ - customer: (Partial & + customer: Partial & Partial & - Partial) & { [key: string]: any }; + Partial; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ date: number; /** An arbitrary string attached to the object. Often useful for displaying to users. */ @@ -3692,7 +3642,7 @@ export interface components { /** Unique identifier for the object. */ id: string; /** The ID of the invoice this invoice item belongs to. */ - invoice?: ((Partial & Partial) & { [key: string]: any }) | null; + invoice?: (Partial & Partial) | null; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -3701,15 +3651,13 @@ export interface components { object: "invoiceitem"; period: components["schemas"]["invoice_line_item_period"]; /** If the invoice item is a proration, the plan of the subscription that the proration was computed for. */ - plan?: (Partial & { [key: string]: any }) | null; + plan?: Partial | null; /** Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. */ proration: boolean; /** 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; /** The subscription that this invoice item has been created for, if any. */ - subscription?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + subscription?: (Partial & Partial) | null; /** The subscription item that this invoice item has been created for, if any. */ subscription_item?: string; /** 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. */ @@ -3718,7 +3666,7 @@ export interface components { unit_amount?: number | null; /** Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. */ unit_amount_decimal?: string | null; - } & { [key: string]: any }; + }; invoices_resource_invoice_tax_id: { /** 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` */ type: @@ -3748,7 +3696,7 @@ export interface components { | "za_vat"; /** The value of the tax ID. */ value?: string | null; - } & { [key: string]: any }; + }; invoices_status_transitions: { /** The time that the invoice draft was finalized. */ finalized_at?: number | null; @@ -3758,7 +3706,7 @@ export interface components { paid_at?: number | null; /** The time that the invoice was voided. */ voided_at?: number | null; - } & { [key: string]: any }; + }; /** * This resource has been renamed to [Early Fraud * Warning](#early_fraud_warning_object) and will be removed in a future API @@ -3768,7 +3716,7 @@ export interface components { /** 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; /** ID of the charge this issuer fraud record is for, optionally expanded. */ - charge: (Partial & Partial) & { [key: string]: any }; + charge: Partial & Partial; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** 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`. */ @@ -3783,7 +3731,7 @@ export interface components { object: "issuer_fraud_record"; /** The timestamp at which the card issuer posted the issuer fraud record. */ post_date: number; - } & { [key: string]: any }; + }; /** * 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 @@ -3802,9 +3750,7 @@ export interface components { balance_transactions: components["schemas"]["balance_transaction"][]; card: components["schemas"]["issuing.card"]; /** The cardholder to whom this authorization belongs. */ - cardholder?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + cardholder?: (Partial & Partial) | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** 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). */ @@ -3823,9 +3769,7 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "issuing.authorization"; /** The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook. */ - pending_request?: - | (Partial & { [key: string]: any }) - | null; + pending_request?: Partial | null; /** 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: components["schemas"]["issuing_authorization_request"][]; /** The current status of the authorization in its lifecycle. */ @@ -3835,7 +3779,7 @@ export interface components { verification_data: components["schemas"]["issuing_authorization_verification_data"]; /** What, if any, digital wallet was used for this authorization. One of `apple_pay`, `google_pay`, or `samsung_pay`. */ wallet?: string | null; - } & { [key: string]: any }; + }; /** You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) that are issued to cardholders. */ "issuing.card": { /** The brand of the card. */ @@ -3866,23 +3810,19 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "issuing.card"; /** The latest card that replaces this card, if any. */ - replaced_by?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + replaced_by?: (Partial & Partial) | null; /** The card this card replaces, if any. */ - replacement_for?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + replacement_for?: (Partial & Partial) | null; /** The reason why the previous card needed to be replaced. */ replacement_reason?: ("damaged" | "expired" | "lost" | "stolen") | null; /** Where and how the card will be shipped. */ - shipping?: (Partial & { [key: string]: any }) | null; + shipping?: Partial | null; spending_controls: components["schemas"]["issuing_card_authorization_controls"]; /** Whether authorizations can be approved on this card. */ status: "active" | "canceled" | "inactive"; /** The type of the card. */ type: "physical" | "virtual"; - } & { [key: string]: any }; + }; /** * An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. * @@ -3891,7 +3831,7 @@ export interface components { "issuing.cardholder": { billing: components["schemas"]["issuing_cardholder_address"]; /** Additional information about a `company` cardholder. */ - company?: (Partial & { [key: string]: any }) | null; + company?: Partial | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** The cardholder's email address. */ @@ -3899,7 +3839,7 @@ export interface components { /** Unique identifier for the object. */ id: string; /** Additional information about an `individual` cardholder. */ - individual?: (Partial & { [key: string]: any }) | null; + individual?: Partial | null; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -3912,14 +3852,12 @@ export interface components { phone_number?: string | null; requirements: components["schemas"]["issuing_cardholder_requirements"]; /** Spending rules that give you some control over how this cardholder's cards can be used. Refer to our [authorizations](https://stripe.com/docs/issuing/purchases/authorizations) documentation for more details. */ - spending_controls?: - | (Partial & { [key: string]: any }) - | null; + spending_controls?: Partial | null; /** Specifies whether to permit authorizations on this cardholder's cards. */ status: "active" | "blocked" | "inactive"; /** One of `individual` or `company`. */ type: "company" | "individual"; - } & { [key: string]: any }; + }; /** * 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. * @@ -3932,7 +3870,7 @@ export interface components { livemode: boolean; /** String representing the object's type. Objects of the same type share the same value. */ object: "issuing.dispute"; - } & { [key: string]: any }; + }; /** 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": { /** The Bank Identification Number reflecting this settlement record. */ @@ -3967,7 +3905,7 @@ export interface components { transaction_count: number; /** The total transaction amount reflected in this settlement. */ transaction_volume: number; - } & { [key: string]: any }; + }; /** * 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 @@ -3979,19 +3917,13 @@ export interface components { /** 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; /** The `Authorization` object that led to this transaction. */ - authorization?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + authorization?: (Partial & Partial) | null; /** ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction. */ - balance_transaction?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + balance_transaction?: (Partial & Partial) | null; /** The card used to make this transaction. */ - card: (Partial & Partial) & { [key: string]: any }; + card: Partial & Partial; /** The cardholder to whom this transaction belongs. */ - cardholder?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + cardholder?: (Partial & Partial) | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** 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). */ @@ -4011,7 +3943,7 @@ export interface components { object: "issuing.transaction"; /** The nature of the transaction. */ type: "capture" | "refund"; - } & { [key: string]: any }; + }; issuing_authorization_merchant_data: { /** 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; @@ -4027,7 +3959,7 @@ export interface components { postal_code?: string | null; /** State where the seller is located */ state?: string | null; - } & { [key: string]: any }; + }; issuing_authorization_pending_request: { /** 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; @@ -4039,7 +3971,7 @@ export interface components { merchant_amount: number; /** The local currency the merchant is requesting to authorize. */ merchant_currency: string; - } & { [key: string]: any }; + }; issuing_authorization_request: { /** 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; @@ -4068,7 +4000,7 @@ export interface components { | "webhook_approved" | "webhook_declined" | "webhook_timeout"; - } & { [key: string]: any }; + }; issuing_authorization_verification_data: { /** Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. */ address_line1_check: "match" | "mismatch" | "not_provided"; @@ -4078,7 +4010,7 @@ export interface components { cvc_check: "match" | "mismatch" | "not_provided"; /** Whether the cardholder provided an expiry date and if it matched Stripe’s record. */ expiry_check: "match" | "mismatch" | "not_provided"; - } & { [key: string]: any }; + }; issuing_card_authorization_controls: { /** Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations permitted on this card. */ allowed_categories?: @@ -4670,7 +4602,7 @@ export interface components { spending_limits?: components["schemas"]["issuing_card_spending_limit"][] | null; /** Currency for the amounts within spending_limits. Locked to the currency of the card. */ spending_limits_currency?: string | null; - } & { [key: string]: any }; + }; issuing_card_shipping: { address: components["schemas"]["address"]; /** The delivery company that shipped a card. */ @@ -4689,7 +4621,7 @@ export interface components { tracking_url?: string | null; /** Packaging options. */ type: "bulk" | "individual"; - } & { [key: string]: any }; + }; issuing_card_spending_limit: { /** Maximum amount allowed to spend per time interval. */ amount: number; @@ -4988,10 +4920,10 @@ export interface components { | null; /** The time interval or event with which to apply this spending limit towards. */ interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; - } & { [key: string]: any }; + }; issuing_cardholder_address: { address: components["schemas"]["address"]; - } & { [key: string]: any }; + }; issuing_cardholder_authorization_controls: { /** 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?: @@ -5583,29 +5515,27 @@ export interface components { spending_limits?: components["schemas"]["issuing_cardholder_spending_limit"][] | null; /** Currency for the amounts within spending_limits. */ spending_limits_currency?: string | null; - } & { [key: string]: any }; + }; issuing_cardholder_company: { /** Whether the company's business ID number was provided. */ tax_id_provided: boolean; - } & { [key: string]: any }; + }; issuing_cardholder_id_document: { /** 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?: ((Partial & Partial) & { [key: string]: any }) | null; + back?: (Partial & Partial) | null; /** 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?: ((Partial & Partial) & { [key: string]: any }) | null; - } & { [key: string]: any }; + front?: (Partial & Partial) | null; + }; issuing_cardholder_individual: { /** The date of birth of this cardholder. */ - dob?: (Partial & { [key: string]: any }) | null; + dob?: Partial | null; /** The first name of this cardholder. */ first_name: string; /** The last name of this cardholder. */ last_name: string; /** Government-issued ID document for this cardholder. */ - verification?: - | (Partial & { [key: string]: any }) - | null; - } & { [key: string]: any }; + verification?: Partial | null; + }; issuing_cardholder_individual_dob: { /** The day of birth, between 1 and 31. */ day?: number | null; @@ -5613,7 +5543,7 @@ export interface components { month?: number | null; /** The four-digit year of birth. */ year?: number | null; - } & { [key: string]: any }; + }; issuing_cardholder_requirements: { /** If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason. */ disabled_reason?: ("listed" | "rejected.listed" | "under_review") | null; @@ -5629,7 +5559,7 @@ export interface components { | "individual.verification.document" )[] | null; - } & { [key: string]: any }; + }; issuing_cardholder_spending_limit: { /** Maximum amount allowed to spend per time interval. */ amount: number; @@ -5928,17 +5858,17 @@ export interface components { | null; /** The time interval or event with which to apply this spending limit towards. */ interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; - } & { [key: string]: any }; + }; issuing_cardholder_verification: { /** An identifying document, either a passport or local ID card. */ - document?: (Partial & { [key: string]: any }) | null; - } & { [key: string]: any }; + document?: Partial | null; + }; legal_entity_company: { address?: components["schemas"]["address"]; /** The Kana variation of the company's primary address (Japan only). */ - address_kana?: (Partial & { [key: string]: any }) | null; + address_kana?: Partial | null; /** The Kanji variation of the company's primary address (Japan only). */ - address_kanji?: (Partial & { [key: string]: any }) | null; + address_kanji?: Partial | null; /** 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; /** 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. */ @@ -5977,23 +5907,21 @@ export interface components { /** Whether the company's business VAT number was provided. */ vat_id_provided?: boolean; /** Information on the verification state of the company. */ - verification?: - | (Partial & { [key: string]: any }) - | null; - } & { [key: string]: any }; + verification?: Partial | null; + }; legal_entity_company_verification: { document: components["schemas"]["legal_entity_company_verification_document"]; - } & { [key: string]: any }; + }; legal_entity_company_verification_document: { /** 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?: ((Partial & Partial) & { [key: string]: any }) | null; + back?: (Partial & Partial) | null; /** A user-displayable string describing the verification state of this document. */ details?: string | null; /** 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; /** 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?: ((Partial & Partial) & { [key: string]: any }) | null; - } & { [key: string]: any }; + front?: (Partial & Partial) | null; + }; legal_entity_dob: { /** The day of birth, between 1 and 31. */ day?: number | null; @@ -6001,7 +5929,7 @@ export interface components { month?: number | null; /** The four-digit year of birth. */ year?: number | null; - } & { [key: string]: any }; + }; legal_entity_japan_address: { /** City/Ward. */ city?: string | null; @@ -6017,12 +5945,10 @@ export interface components { state?: string | null; /** Town/cho-me. */ town?: string | null; - } & { [key: string]: any }; + }; legal_entity_person_verification: { /** A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. */ - additional_document?: - | (Partial & { [key: string]: any }) - | null; + additional_document?: Partial | null; /** 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; /** 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. */ @@ -6030,17 +5956,17 @@ export interface components { document?: components["schemas"]["legal_entity_person_verification_document"]; /** The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`. */ status: string; - } & { [key: string]: any }; + }; legal_entity_person_verification_document: { /** 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?: ((Partial & Partial) & { [key: string]: any }) | null; + back?: (Partial & Partial) | null; /** 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; /** 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; /** 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?: ((Partial & Partial) & { [key: string]: any }) | null; - } & { [key: string]: any }; + front?: (Partial & Partial) | null; + }; light_account_logout: { [key: string]: any }; line_item: { /** The amount, in %s. */ @@ -6063,7 +5989,7 @@ export interface components { object: "line_item"; period: components["schemas"]["invoice_line_item_period"]; /** The plan of the subscription, if the line item is a subscription or a proration. */ - plan?: (Partial & { [key: string]: any }) | null; + plan?: Partial | null; /** Whether this is a proration. */ proration: boolean; /** The quantity of the subscription, if the line item is a subscription or a proration. */ @@ -6078,7 +6004,7 @@ export interface components { tax_rates?: components["schemas"]["tax_rate"][] | null; /** A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`. */ type: "invoiceitem" | "subscription"; - } & { [key: string]: any }; + }; login_link: { /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; @@ -6086,7 +6012,7 @@ export interface components { object: "login_link"; /** The URL for the login link. */ url: string; - } & { [key: string]: any }; + }; /** 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"]; @@ -6098,18 +6024,18 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "mandate"; /** ID of the payment method associated with this mandate. */ - payment_method: (Partial & Partial) & { [key: string]: any }; + payment_method: Partial & Partial; payment_method_details: components["schemas"]["mandate_payment_method_details"]; single_use?: components["schemas"]["mandate_single_use"]; /** The status of the mandate, which indicates whether it can be used to initiate a payment. */ status: "active" | "inactive" | "pending"; /** The type of the mandate. */ type: "multi_use" | "single_use"; - } & { [key: string]: any }; + }; mandate_au_becs_debit: { /** The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. */ url: string; - } & { [key: string]: any }; + }; mandate_multi_use: { [key: string]: any }; mandate_payment_method_details: { au_becs_debit?: components["schemas"]["mandate_au_becs_debit"]; @@ -6117,38 +6043,38 @@ export interface components { sepa_debit?: components["schemas"]["mandate_sepa_debit"]; /** 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; - } & { [key: string]: any }; + }; mandate_sepa_debit: { /** The unique reference of the mandate. */ reference: string; /** The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. */ url: string; - } & { [key: string]: any }; + }; mandate_single_use: { /** On a single use mandate, the amount of the payment. */ amount: number; /** On a single use mandate, the currency of the payment. */ currency: string; - } & { [key: string]: any }; + }; notification_event_data: { /** 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]: any }; /** Object containing the names of the attributes that have changed, and their previous values (sent along only with *.updated events). */ previous_attributes?: { [key: string]: any }; - } & { [key: string]: any }; + }; notification_event_request: { /** 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; /** 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; - } & { [key: string]: any }; + }; offline_acceptance: { [key: string]: any }; online_acceptance: { /** The IP address from which the Mandate was accepted by the customer. */ ip_address?: string | null; /** The user agent of the browser from which the Mandate was accepted by the customer. */ user_agent?: string | null; - } & { [key: string]: any }; + }; /** * 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 @@ -6166,16 +6092,16 @@ export interface components { /** 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; /** The ID of the payment used to pay for the order. Present if the order status is `paid`, `fulfilled`, or `refunded`. */ - charge?: ((Partial & Partial) & { [key: string]: any }) | null; + charge?: (Partial & Partial) | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** 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; /** The customer used for the order. */ customer?: - | ((Partial & + | (Partial & Partial & - Partial) & { [key: string]: any }) + Partial) | null; /** The email address of the customer placing the order. */ email?: string | null; @@ -6192,33 +6118,31 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "order"; /** A list of returns that have taken place for this order. */ - returns?: - | ({ - /** Details about each object. */ - data: components["schemas"]["order_return"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; - } & { [key: string]: any }) - | null; + returns?: { + /** Details about each object. */ + data: components["schemas"]["order_return"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } | null; /** 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; /** The shipping address for the order. Present if the order is for goods to be shipped. */ - shipping?: (Partial & { [key: string]: any }) | null; + shipping?: Partial | null; /** 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; /** 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; /** The timestamps at which the order status was updated. */ - status_transitions?: (Partial & { [key: string]: any }) | null; + status_transitions?: Partial | null; /** Time at which the object was last updated. Measured in seconds since the Unix epoch. */ updated?: number | null; /** The user's order ID if it is different from the Stripe order ID. */ upstream_id?: string; - } & { [key: string]: any }; + }; /** * 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. @@ -6235,12 +6159,12 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "order_item"; /** The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). */ - parent?: ((Partial & Partial) & { [key: string]: any }) | null; + parent?: (Partial & Partial) | null; /** 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; /** The type of line item. One of `sku`, `tax`, `shipping`, or `discount`. */ type: string; - } & { [key: string]: any }; + }; /** * 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. @@ -6263,10 +6187,10 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "order_return"; /** The order that this return includes items from. */ - order?: ((Partial & Partial) & { [key: string]: any }) | null; + order?: (Partial & Partial) | null; /** The ID of the refund issued for this return. */ - refund?: ((Partial & Partial) & { [key: string]: any }) | null; - } & { [key: string]: any }; + refund?: (Partial & Partial) | null; + }; package_dimensions: { /** Height, in inches. */ height: number; @@ -6276,7 +6200,7 @@ export interface components { weight: number; /** Width, in inches. */ width: number; - } & { [key: string]: any }; + }; /** * 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 @@ -6298,7 +6222,7 @@ export interface components { /** Amount that was collected by this PaymentIntent. */ amount_received?: number; /** ID of the Connect application that created the PaymentIntent. */ - application?: ((Partial & Partial) & { [key: string]: any }) | null; + application?: (Partial & Partial) | null; /** 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 | null; /** Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. */ @@ -6327,7 +6251,7 @@ export interface components { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; /** * The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. * @@ -6349,42 +6273,38 @@ export interface components { * 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?: - | ((Partial & + | (Partial & Partial & - Partial) & { [key: string]: any }) + Partial) | null; /** An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string | null; /** Unique identifier for the object. */ id: string; /** ID of the invoice that created this PaymentIntent, if it exists. */ - invoice?: ((Partial & Partial) & { [key: string]: any }) | null; + invoice?: (Partial & Partial) | null; /** 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?: (Partial & { [key: string]: any }) | null; + last_payment_error?: Partial | null; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** Set of key-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]: string }; /** 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?: (Partial & { [key: string]: any }) | null; + next_action?: Partial | null; /** String representing the object's type. Objects of the same type share the same value. */ object: "payment_intent"; /** 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?: ((Partial & Partial) & { [key: string]: any }) | null; + on_behalf_of?: (Partial & Partial) | null; /** ID of the payment method used in this PaymentIntent. */ - payment_method?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + payment_method?: (Partial & Partial) | null; /** Payment-method-specific configuration for this PaymentIntent. */ - payment_method_options?: - | (Partial & { [key: string]: any }) - | null; + payment_method_options?: Partial | null; /** The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ payment_method_types: string[]; /** Email address that the receipt for the resulting payment will be sent to. */ receipt_email?: string | null; /** ID of the review associated with this PaymentIntent, if any. */ - review?: ((Partial & Partial) & { [key: string]: any }) | null; + review?: (Partial & Partial) | null; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -6394,7 +6314,7 @@ export interface components { */ setup_future_usage?: ("off_session" | "on_session") | null; /** Shipping information for this PaymentIntent. */ - shipping?: (Partial & { [key: string]: any }) | null; + shipping?: Partial | null; /** 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; /** 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. */ @@ -6409,38 +6329,36 @@ export interface components { | "requires_payment_method" | "succeeded"; /** 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?: (Partial & { [key: string]: any }) | null; + transfer_data?: Partial | null; /** 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; - } & { [key: string]: any }; + }; payment_intent_next_action: { redirect_to_url?: components["schemas"]["payment_intent_next_action_redirect_to_url"]; /** Type of the next action to perform, one of `redirect_to_url` or `use_stripe_sdk`. */ type: string; /** 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]: any }; - } & { [key: string]: any }; + }; payment_intent_next_action_redirect_to_url: { /** If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ return_url?: string | null; /** The URL you must redirect your customer to in order to authenticate the payment. */ url?: string | null; - } & { [key: string]: any }; + }; payment_intent_payment_method_options: { card?: components["schemas"]["payment_intent_payment_method_options_card"]; - } & { [key: string]: any }; + }; payment_intent_payment_method_options_card: { /** * Installment details for this payment (Mexico only). * * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). */ - installments?: - | (Partial & { [key: string]: any }) - | null; + installments?: Partial | null; /** 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. */ request_three_d_secure?: ("any" | "automatic" | "challenge_only") | null; - } & { [key: string]: any }; + }; /** * 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 @@ -6456,7 +6374,7 @@ export interface components { /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** 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?: ((Partial & Partial) & { [key: string]: any }) | null; + customer?: (Partial & Partial) | null; fpx?: components["schemas"]["payment_method_fpx"]; /** Unique identifier for the object. */ id: string; @@ -6470,7 +6388,7 @@ export interface components { sepa_debit?: components["schemas"]["payment_method_sepa_debit"]; /** 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. */ type: "au_becs_debit" | "card" | "fpx" | "ideal" | "sepa_debit"; - } & { [key: string]: any }; + }; payment_method_au_becs_debit: { /** Six-digit number identifying bank and branch associated with this bank account. */ bsb_number?: string | null; @@ -6478,12 +6396,12 @@ export interface components { fingerprint?: string | null; /** Last four digits of the bank account number. */ last4?: string | null; - } & { [key: string]: any }; + }; payment_method_card: { /** Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ brand: string; /** Checks on Card address and CVC if provided. */ - checks?: (Partial & { [key: string]: any }) | null; + checks?: Partial | null; /** 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; /** Two-digit number representing the card's expiration month. */ @@ -6495,16 +6413,14 @@ export interface components { /** Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ funding: string; /** Details of the original PaymentMethod that created this object. */ - generated_from?: - | (Partial & { [key: string]: any }) - | null; + generated_from?: Partial | null; /** The last four digits of the card. */ last4: string; /** Contains details on how this Card maybe be used for 3D Secure authentication. */ - three_d_secure_usage?: (Partial & { [key: string]: any }) | null; + three_d_secure_usage?: Partial | null; /** If this Card is part of a card wallet, this contains the details of the card wallet. */ - wallet?: (Partial & { [key: string]: any }) | null; - } & { [key: string]: any }; + wallet?: Partial | null; + }; payment_method_card_checks: { /** If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ address_line1_check?: string | null; @@ -6512,15 +6428,13 @@ export interface components { address_postal_code_check?: string | null; /** If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ cvc_check?: string | null; - } & { [key: string]: any }; + }; payment_method_card_generated_card: { /** The charge that created this object. */ charge?: string | null; /** Transaction-specific details of the payment method used in the payment. */ - payment_method_details?: - | (Partial & { [key: string]: any }) - | null; - } & { [key: string]: any }; + payment_method_details?: Partial | null; + }; payment_method_card_present: { [key: string]: any }; payment_method_card_wallet: { amex_express_checkout?: components["schemas"]["payment_method_card_wallet_amex_express_checkout"]; @@ -6533,31 +6447,31 @@ export interface components { /** 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. */ type: "amex_express_checkout" | "apple_pay" | "google_pay" | "masterpass" | "samsung_pay" | "visa_checkout"; visa_checkout?: components["schemas"]["payment_method_card_wallet_visa_checkout"]; - } & { [key: string]: any }; + }; payment_method_card_wallet_amex_express_checkout: { [key: string]: any }; payment_method_card_wallet_apple_pay: { [key: string]: any }; payment_method_card_wallet_google_pay: { [key: string]: any }; payment_method_card_wallet_masterpass: { /** 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?: (Partial & { [key: string]: any }) | null; + billing_address?: Partial | null; /** 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; /** 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; /** 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?: (Partial & { [key: string]: any }) | null; - } & { [key: string]: any }; + shipping_address?: Partial | null; + }; payment_method_card_wallet_samsung_pay: { [key: string]: any }; payment_method_card_wallet_visa_checkout: { /** 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?: (Partial & { [key: string]: any }) | null; + billing_address?: Partial | null; /** 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; /** 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; /** 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?: (Partial & { [key: string]: any }) | null; - } & { [key: string]: any }; + shipping_address?: Partial | null; + }; payment_method_details: { ach_credit_transfer?: components["schemas"]["payment_method_details_ach_credit_transfer"]; ach_debit?: components["schemas"]["payment_method_details_ach_debit"]; @@ -6583,7 +6497,7 @@ export interface components { */ type: string; wechat?: components["schemas"]["payment_method_details_wechat"]; - } & { [key: string]: any }; + }; payment_method_details_ach_credit_transfer: { /** Account number to transfer funds to. */ account_number?: string | null; @@ -6593,7 +6507,7 @@ export interface components { routing_number?: string | null; /** SWIFT code of the bank associated with the routing number. */ swift_code?: string | null; - } & { [key: string]: any }; + }; payment_method_details_ach_debit: { /** Type of entity that holds the account. This can be either `individual` or `company`. */ account_holder_type?: ("company" | "individual") | null; @@ -6607,7 +6521,7 @@ export interface components { last4?: string | null; /** Routing transit number of the bank account. */ routing_number?: string | null; - } & { [key: string]: any }; + }; payment_method_details_alipay: { [key: string]: any }; payment_method_details_au_becs_debit: { /** Bank-State-Branch number of the bank account. */ @@ -6618,7 +6532,7 @@ export interface components { last4?: string | null; /** ID of the mandate used to make this payment. */ mandate?: string; - } & { [key: string]: any }; + }; payment_method_details_bancontact: { /** Bank code of bank associated with the bank account. */ bank_code?: string | null; @@ -6638,12 +6552,12 @@ export interface components { * (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ verified_name?: string | null; - } & { [key: string]: any }; + }; payment_method_details_card: { /** Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ brand?: string | null; /** Check results by Card networks on Card address and CVC at time of payment. */ - checks?: (Partial & { [key: string]: any }) | null; + checks?: Partial | null; /** 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; /** Two-digit number representing the card's expiration month. */ @@ -6659,18 +6573,16 @@ export interface components { * * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). */ - installments?: - | (Partial & { [key: string]: any }) - | null; + installments?: Partial | null; /** The last four digits of the card. */ last4?: string | null; /** Identifies which network this charge was processed on. Can be `amex`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ network?: string | null; /** Populated if this transaction used 3D Secure authentication. */ - three_d_secure?: (Partial & { [key: string]: any }) | null; + three_d_secure?: Partial | null; /** If this Card is part of a card wallet, this contains the details of the card wallet. */ - wallet?: (Partial & { [key: string]: any }) | null; - } & { [key: string]: any }; + wallet?: Partial | null; + }; payment_method_details_card_checks: { /** If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ address_line1_check?: string | null; @@ -6678,13 +6590,11 @@ export interface components { address_postal_code_check?: string | null; /** If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. */ cvc_check?: string | null; - } & { [key: string]: any }; + }; payment_method_details_card_installments: { /** Installment plan selected for the payment. */ - plan?: - | (Partial & { [key: string]: any }) - | null; - } & { [key: string]: any }; + plan?: Partial | null; + }; payment_method_details_card_installments_plan: { /** For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. */ count?: number | null; @@ -6695,7 +6605,7 @@ export interface components { interval?: "month" | null; /** Type of installment plan, one of `fixed_count`. */ type: "fixed_count"; - } & { [key: string]: any }; + }; payment_method_details_card_present: { /** Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ brand?: string | null; @@ -6722,10 +6632,8 @@ export interface components { /** 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 | null; /** A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ - receipt?: - | (Partial & { [key: string]: any }) - | null; - } & { [key: string]: any }; + receipt?: Partial | null; + }; payment_method_details_card_present_receipt: { /** EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ application_cryptogram?: string | null; @@ -6743,7 +6651,7 @@ export interface components { terminal_verification_results?: string | null; /** An indication of various EMV functions performed during the transaction. */ transaction_status_information?: string | null; - } & { [key: string]: any }; + }; 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"]; @@ -6755,38 +6663,38 @@ export interface components { /** 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. */ type: "amex_express_checkout" | "apple_pay" | "google_pay" | "masterpass" | "samsung_pay" | "visa_checkout"; visa_checkout?: components["schemas"]["payment_method_details_card_wallet_visa_checkout"]; - } & { [key: string]: any }; + }; payment_method_details_card_wallet_amex_express_checkout: { [key: string]: any }; payment_method_details_card_wallet_apple_pay: { [key: string]: any }; payment_method_details_card_wallet_google_pay: { [key: string]: any }; payment_method_details_card_wallet_masterpass: { /** 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?: (Partial & { [key: string]: any }) | null; + billing_address?: Partial | null; /** 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; /** 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; /** 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?: (Partial & { [key: string]: any }) | null; - } & { [key: string]: any }; + shipping_address?: Partial | null; + }; payment_method_details_card_wallet_samsung_pay: { [key: string]: any }; payment_method_details_card_wallet_visa_checkout: { /** 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?: (Partial & { [key: string]: any }) | null; + billing_address?: Partial | null; /** 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; /** 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; /** 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?: (Partial & { [key: string]: any }) | null; - } & { [key: string]: any }; + shipping_address?: Partial | null; + }; payment_method_details_eps: { /** * 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 | null; - } & { [key: string]: any }; + }; payment_method_details_fpx: { /** 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`. */ bank: @@ -6812,7 +6720,7 @@ export interface components { | "uob"; /** Unique transaction id generated by FPX for every request from the merchant */ transaction_id?: string | null; - } & { [key: string]: any }; + }; payment_method_details_giropay: { /** Bank code of bank associated with the bank account. */ bank_code?: string | null; @@ -6825,7 +6733,7 @@ export interface components { * (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ verified_name?: string | null; - } & { [key: string]: any }; + }; payment_method_details_ideal: { /** 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`. */ bank?: @@ -6868,14 +6776,14 @@ export interface components { * (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ verified_name?: string | null; - } & { [key: string]: any }; + }; payment_method_details_klarna: { [key: string]: any }; payment_method_details_multibanco: { /** Entity number associated with this Multibanco payment. */ entity?: string | null; /** Reference number associated with this Multibanco payment. */ reference?: string | null; - } & { [key: string]: any }; + }; payment_method_details_p24: { /** Unique reference for this Przelewy24 payment. */ reference?: string | null; @@ -6884,7 +6792,7 @@ export interface components { * (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ verified_name?: string | null; - } & { [key: string]: any }; + }; payment_method_details_sepa_debit: { /** Bank code of bank associated with the bank account. */ bank_code?: string | null; @@ -6898,7 +6806,7 @@ export interface components { last4?: string | null; /** ID of the mandate used to make this payment. */ mandate?: string | null; - } & { [key: string]: any }; + }; payment_method_details_sofort: { /** Bank code of bank associated with the bank account. */ bank_code?: string | null; @@ -6915,7 +6823,7 @@ export interface components { * (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ verified_name?: string | null; - } & { [key: string]: any }; + }; payment_method_details_stripe_account: { [key: string]: any }; payment_method_details_wechat: { [key: string]: any }; payment_method_fpx: { @@ -6941,7 +6849,7 @@ export interface components { | "rhb" | "standard_chartered" | "uob"; - } & { [key: string]: any }; + }; payment_method_ideal: { /** 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`. */ bank?: @@ -6977,17 +6885,15 @@ export interface components { | "TRIONL2U" ) | null; - } & { [key: string]: any }; + }; payment_method_options_card_installments: { /** Installment plans that may be selected for this PaymentIntent. */ available_plans?: components["schemas"]["payment_method_details_card_installments_plan"][] | null; /** Whether Installments are enabled for this PaymentIntent. */ enabled: boolean; /** Installment plan selected for this PaymentIntent. */ - plan?: - | (Partial & { [key: string]: any }) - | null; - } & { [key: string]: any }; + plan?: Partial | null; + }; payment_method_sepa_debit: { /** Bank code of bank associated with the bank account. */ bank_code?: string | null; @@ -6999,7 +6905,7 @@ export interface components { fingerprint?: string | null; /** Last four characters of the IBAN. */ last4?: string | null; - } & { [key: string]: any }; + }; payment_pages_payment_page_resources_shipping_address_collection: { /** * An array of two-letter ISO country codes representing which countries Checkout should provide as options for @@ -7244,13 +7150,13 @@ export interface components { | "ZW" | "ZZ" )[]; - } & { [key: string]: any }; - payment_source: (Partial & + }; + payment_source: Partial & Partial & Partial & Partial & Partial & - Partial) & { [key: string]: any }; + Partial; /** * 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 @@ -7269,9 +7175,7 @@ export interface components { /** 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; /** ID of the balance transaction that describes the impact of this payout on your account balance. */ - balance_transaction?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + balance_transaction?: (Partial & Partial) | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** 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). */ @@ -7280,16 +7184,14 @@ export interface components { description?: string | null; /** ID of the bank account or card the payout was sent to. */ destination?: - | ((Partial & + | (Partial & Partial & Partial & Partial & - Partial) & { [key: string]: any }) + Partial) | null; /** 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?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + failure_balance_transaction?: (Partial & Partial) | null; /** 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; /** Message to user further explaining reason for payout failure if available. */ @@ -7312,13 +7214,13 @@ export interface components { status: string; /** Can be `bank_account` or `card`. */ type: "bank_account" | "card"; - } & { [key: string]: any }; + }; period: { /** The end date of this usage period. All usage up to and including this point in time is included. */ end?: number | null; /** The start date of this usage period. All usage after this point in time is included. */ start?: number | null; - } & { [key: string]: any }; + }; /** * This is an object representing a person associated with a Stripe account. * @@ -7327,8 +7229,8 @@ export interface components { person: { account: string; address?: components["schemas"]["address"]; - address_kana?: (Partial & { [key: string]: any }) | null; - address_kanji?: (Partial & { [key: string]: any }) | null; + address_kana?: Partial | null; + address_kanji?: Partial | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; dob?: components["schemas"]["legal_entity_dob"]; @@ -7350,10 +7252,10 @@ export interface components { object: "person"; phone?: string | null; relationship?: components["schemas"]["person_relationship"]; - requirements?: (Partial & { [key: string]: any }) | null; + requirements?: Partial | null; ssn_last_4_provided?: boolean; verification?: components["schemas"]["legal_entity_person_verification"]; - } & { [key: string]: any }; + }; person_relationship: { /** 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 | null; @@ -7367,7 +7269,7 @@ export interface components { representative?: boolean | null; /** The person's title (e.g., CEO, Support Engineer). */ title?: string | null; - } & { [key: string]: any }; + }; person_requirements: { /** 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[]; @@ -7379,7 +7281,7 @@ export interface components { past_due: string[]; /** 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[]; - } & { [key: string]: any }; + }; /** * Plans define the base price, currency, and billing cycle for subscriptions. * For example, you might have a $5/month plan @@ -7419,21 +7321,21 @@ export interface components { object: "plan"; /** The product whose pricing this plan determines. */ product?: - | ((Partial & + | (Partial & Partial & - Partial) & { [key: string]: any }) + Partial) | null; /** 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"][] | null; /** 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. */ tiers_mode?: ("graduated" | "volume") | null; /** Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. */ - transform_usage?: (Partial & { [key: string]: any }) | null; + transform_usage?: Partial | null; /** 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; /** 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`. */ usage_type: "licensed" | "metered"; - } & { [key: string]: any }; + }; plan_tier: { /** Price for the entire tier. */ flat_amount?: number | null; @@ -7445,7 +7347,7 @@ export interface components { unit_amount_decimal?: string | null; /** Up to and including to this quantity will be contained in the tier. */ up_to?: number | null; - } & { [key: string]: any }; + }; platform_tax_fee: { /** The Connected account that incurred this charge. */ account: string; @@ -7457,7 +7359,7 @@ export interface components { source_transaction: string; /** The type of tax (VAT). */ type: string; - } & { [key: string]: any }; + }; /** * Store representations of products you sell in `Product` objects, used in * conjunction with [SKUs](https://stripe.com/docs/api#skus). Products may be physical goods, to be shipped, or @@ -7494,7 +7396,7 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "product"; /** The dimensions of this product for shipping purposes. A SKU associated with this product can override this value by having its own `package_dimensions`. Only applicable to products of `type=good`. */ - package_dimensions?: (Partial & { [key: string]: any }) | null; + package_dimensions?: Partial | null; /** Whether this product is a shipped good. Only applicable to products of `type=good`. */ shippable?: boolean | null; /** 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. */ @@ -7507,7 +7409,7 @@ export interface components { updated: number; /** A URL of a publicly-accessible webpage for this product. Only applicable to products of `type=good`. */ url?: string | null; - } & { [key: string]: any }; + }; /** * An early fraud warning indicates that the card issuer has notified us that a * charge may be fraudulent. @@ -7518,7 +7420,7 @@ export interface components { /** 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; /** ID of the charge this early fraud warning is for, optionally expanded. */ - charge: (Partial & Partial) & { [key: string]: any }; + charge: Partial & Partial; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** 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`. */ @@ -7529,7 +7431,7 @@ export interface components { livemode: boolean; /** String representing the object's type. Objects of the same type share the same value. */ object: "radar.early_fraud_warning"; - } & { [key: string]: any }; + }; /** * Value lists allow you to group values together which can then be referenced in rules. * @@ -7563,7 +7465,7 @@ export interface components { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -7572,7 +7474,7 @@ export interface components { name: string; /** String representing the object's type. Objects of the same type share the same value. */ object: "radar.value_list"; - } & { [key: string]: any }; + }; /** * Value list items allow you to add specific values to a given Radar value list, which can then be used in rules. * @@ -7593,7 +7495,7 @@ export interface components { value: string; /** The identifier of the value list this item belongs to. */ value_list: string; - } & { [key: string]: any }; + }; radar_review_resource_location: { /** The city where the payment originated. */ city?: string | null; @@ -7605,7 +7507,7 @@ export interface components { longitude?: number | null; /** The state/county/province/region where the payment originated. */ region?: string | null; - } & { [key: string]: any }; + }; radar_review_resource_session: { /** The browser used in this browser session (e.g., `Chrome`). */ browser?: string | null; @@ -7615,7 +7517,7 @@ export interface components { platform?: string | null; /** The version for the browser session (e.g., `61.0.3163.100`). */ version?: string | null; - } & { [key: string]: any }; + }; /** * 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, @@ -7631,22 +7533,20 @@ export interface components { */ recipient: { /** Hash describing the current account on the recipient, if there is one. */ - active_account?: (Partial & { [key: string]: any }) | null; - cards?: - | ({ - data: components["schemas"]["card"][]; - /** True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ - object: "list"; - /** The URL where this list can be accessed. */ - url: string; - } & { [key: string]: any }) - | null; + active_account?: Partial | null; + cards?: { + data: components["schemas"]["card"][]; + /** True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ + object: "list"; + /** The URL where this list can be accessed. */ + url: string; + } | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** The default card to use for creating transfers to this recipient. */ - default_card?: ((Partial & Partial) & { [key: string]: any }) | null; + default_card?: (Partial & Partial) | null; /** An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string | null; email?: string | null; @@ -7657,15 +7557,15 @@ export interface components { /** Set of key-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]: string }; /** 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?: ((Partial & Partial) & { [key: string]: any }) | null; + migrated_to?: (Partial & Partial) | null; /** Full, legal name of the recipient. */ name?: string | null; /** String representing the object's type. Objects of the same type share the same value. */ object: "recipient"; - rolled_back_from?: (Partial & Partial) & { [key: string]: any }; + rolled_back_from?: Partial & Partial; /** Type of the recipient, one of `individual` or `corporation`. */ type: string; - } & { [key: string]: any }; + }; /** * `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 @@ -7677,11 +7577,9 @@ export interface components { /** Amount, in %s. */ amount: number; /** Balance transaction that describes the impact on your account balance. */ - balance_transaction?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + balance_transaction?: (Partial & Partial) | null; /** ID of the charge that was refunded. */ - charge?: ((Partial & Partial) & { [key: string]: any }) | null; + charge?: (Partial & Partial) | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** 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). */ @@ -7689,9 +7587,7 @@ export interface components { /** An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only) */ description?: string; /** If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. */ - failure_balance_transaction?: (Partial & Partial) & { - [key: string]: any; - }; + failure_balance_transaction?: Partial & Partial; /** 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; /** Unique identifier for the object. */ @@ -7701,24 +7597,18 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "refund"; /** ID of the PaymentIntent that was refunded. */ - payment_intent?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + payment_intent?: (Partial & Partial) | null; /** Reason for the refund, either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). */ reason?: string | null; /** This is the transaction number that appears on email receipts sent for this refund. */ receipt_number?: string | null; /** 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?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + source_transfer_reversal?: (Partial & Partial) | null; /** 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; /** If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter. */ - transfer_reversal?: - | ((Partial & Partial) & { [key: string]: any }) - | null; - } & { [key: string]: any }; + transfer_reversal?: (Partial & Partial) | null; + }; /** * 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. @@ -7751,7 +7641,7 @@ export interface components { * The file object representing the result of the report run (populated when * `status=succeeded`). */ - result?: (Partial & { [key: string]: any }) | null; + result?: Partial | null; /** * 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. @@ -7763,7 +7653,7 @@ export interface components { * `status=succeeded`). Measured in seconds since the Unix epoch. */ succeeded_at?: number | null; - } & { [key: string]: any }; + }; /** * The Report Type resource corresponds to a particular type of report, such as * the "Activity summary" or "Itemized payouts" reports. These objects are @@ -7792,7 +7682,7 @@ export interface components { updated: number; /** 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; - } & { [key: string]: any }; + }; reserve_transaction: { amount: number; /** 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). */ @@ -7803,7 +7693,7 @@ export interface components { id: string; /** String representing the object's type. Objects of the same type share the same value. */ object: "reserve_transaction"; - } & { [key: string]: any }; + }; /** * Reviews can be used to supplement automated fraud detection with human expertise. * @@ -7814,7 +7704,7 @@ export interface components { /** The ZIP or postal code of the card used, if applicable. */ billing_zip?: string | null; /** The charge associated with this review. */ - charge?: ((Partial & Partial) & { [key: string]: any }) | null; + charge?: (Partial & Partial) | null; /** The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, or `disputed`. */ closed_reason?: ("approved" | "disputed" | "refunded" | "refunded_as_fraud") | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ @@ -7824,9 +7714,7 @@ export interface components { /** The IP address where the payment originated. */ ip_address?: string | null; /** 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?: - | (Partial & { [key: string]: any }) - | null; + ip_address_location?: Partial | null; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** String representing the object's type. Objects of the same type share the same value. */ @@ -7836,12 +7724,12 @@ export interface components { /** The reason the review was opened. One of `rule` or `manual`. */ opened_reason: "manual" | "rule"; /** The PaymentIntent ID associated with this review, if one exists. */ - payment_intent?: (Partial & Partial) & { [key: string]: any }; + payment_intent?: Partial & Partial; /** The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, or `disputed`. */ reason: string; /** Information related to the browsing session of the user who initiated the payment. */ - session?: (Partial & { [key: string]: any }) | null; - } & { [key: string]: any }; + session?: Partial | null; + }; rule: { /** The action taken on the payment. */ action: string; @@ -7849,7 +7737,7 @@ export interface components { id: string; /** The predicate to evaluate the payment against. */ predicate: string; - } & { [key: string]: any }; + }; /** * 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 @@ -7863,7 +7751,7 @@ export interface components { data_load_time: number; error?: components["schemas"]["sigma_scheduled_query_run_error"]; /** The file object representing the results of the query. */ - file?: (Partial & { [key: string]: any }) | null; + file?: Partial | null; /** Unique identifier for the object. */ id: string; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -7878,7 +7766,7 @@ export interface components { status: string; /** Title of the query. */ title: string; - } & { [key: string]: any }; + }; /** * 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. @@ -7905,7 +7793,7 @@ export interface components { */ setup_intent: { /** ID of the Connect application that created the SetupIntent. */ - application?: ((Partial & Partial) & { [key: string]: any }) | null; + application?: (Partial & Partial) | null; /** Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. */ cancellation_reason?: ("abandoned" | "duplicate" | "requested_by_customer") | null; /** @@ -7922,42 +7810,36 @@ export interface components { * 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?: - | ((Partial & + | (Partial & Partial & - Partial) & { [key: string]: any }) + Partial) | null; /** An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string | null; /** Unique identifier for the object. */ id: string; /** The error encountered in the previous SetupIntent confirmation. */ - last_setup_error?: (Partial & { [key: string]: any }) | null; + last_setup_error?: Partial | null; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** ID of the multi use Mandate generated by the SetupIntent. */ - mandate?: ((Partial & Partial) & { [key: string]: any }) | null; + mandate?: (Partial & Partial) | null; /** Set of key-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]: string }; /** If present, this property tells you what actions you need to take in order for your customer to continue payment setup. */ - next_action?: (Partial & { [key: string]: any }) | null; + next_action?: Partial | null; /** String representing the object's type. Objects of the same type share the same value. */ object: "setup_intent"; /** The account (if any) for which the setup is intended. */ - on_behalf_of?: ((Partial & Partial) & { [key: string]: any }) | null; + on_behalf_of?: (Partial & Partial) | null; /** ID of the payment method used with this SetupIntent. */ - payment_method?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + payment_method?: (Partial & Partial) | null; /** Payment-method-specific configuration for this SetupIntent. */ - payment_method_options?: - | (Partial & { [key: string]: any }) - | null; + payment_method_options?: Partial | null; /** The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. */ payment_method_types: string[]; /** ID of the single_use Mandate generated by the SetupIntent. */ - single_use_mandate?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + single_use_mandate?: (Partial & Partial) | null; /** [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`. */ status: | "canceled" @@ -7972,27 +7854,27 @@ export interface components { * 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; - } & { [key: string]: any }; + }; setup_intent_next_action: { redirect_to_url?: components["schemas"]["setup_intent_next_action_redirect_to_url"]; /** Type of the next action to perform, one of `redirect_to_url` or `use_stripe_sdk`. */ type: string; /** 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]: any }; - } & { [key: string]: any }; + }; setup_intent_next_action_redirect_to_url: { /** If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ return_url?: string | null; /** The URL you must redirect your customer to in order to authenticate. */ url?: string | null; - } & { [key: string]: any }; + }; setup_intent_payment_method_options: { card?: components["schemas"]["setup_intent_payment_method_options_card"]; - } & { [key: string]: any }; + }; setup_intent_payment_method_options_card: { /** 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. */ request_three_d_secure?: ("any" | "automatic" | "challenge_only") | null; - } & { [key: string]: any }; + }; shipping: { address?: components["schemas"]["address"]; /** The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. */ @@ -8003,23 +7885,23 @@ export interface components { phone?: string | null; /** 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; - } & { [key: string]: any }; + }; shipping_method: { /** 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; /** 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; /** The estimated delivery date for the given shipping method. Can be either a specific date or a range. */ - delivery_estimate?: (Partial & { [key: string]: any }) | null; + delivery_estimate?: Partial | null; /** An arbitrary string attached to the object. Often useful for displaying to users. */ description: string; /** Unique identifier for the object. */ id: string; - } & { [key: string]: any }; + }; sigma_scheduled_query_run_error: { /** Information about the run failure. */ message: string; - } & { [key: string]: any }; + }; /** * 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, @@ -8051,14 +7933,14 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "sku"; /** The dimensions of this SKU for shipping purposes. */ - package_dimensions?: (Partial & { [key: string]: any }) | null; + package_dimensions?: Partial | null; /** 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; /** The ID of the product this SKU is associated with. The product must be currently active. */ - product: (Partial & Partial) & { [key: string]: any }; + product: Partial & Partial; /** Time at which the object was last updated. Measured in seconds since the Unix epoch. */ updated: number; - } & { [key: string]: any }; + }; /** * `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 @@ -8102,7 +7984,7 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "source"; /** Information about the owner of the payment instrument that may be used or required by particular source types. */ - owner?: (Partial & { [key: string]: any }) | null; + owner?: Partial | null; p24?: components["schemas"]["source_type_p24"]; receiver?: components["schemas"]["source_receiver_flow"]; redirect?: components["schemas"]["source_redirect_flow"]; @@ -8136,13 +8018,13 @@ export interface components { /** 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"]; - } & { [key: string]: any }; + }; source_code_verification_flow: { /** The number of attempts remaining to authenticate the source object with a verification code. */ attempts_remaining: number; /** 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; - } & { [key: string]: any }; + }; /** * 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 @@ -8168,11 +8050,11 @@ export interface components { status: string; /** 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; - } & { [key: string]: any }; + }; source_mandate_notification_bacs_debit_data: { /** Last 4 digits of the account number associated with the debit. */ last4?: string; - } & { [key: string]: any }; + }; source_mandate_notification_sepa_debit_data: { /** SEPA creditor ID. */ creditor_identifier?: string; @@ -8180,7 +8062,7 @@ export interface components { last4?: string; /** Mandate reference associated with the debit. */ mandate_reference?: string; - } & { [key: string]: any }; + }; source_order: { /** 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; @@ -8191,7 +8073,7 @@ export interface components { /** List of items constituting the order. */ items?: components["schemas"]["source_order_item"][] | null; shipping?: components["schemas"]["shipping"]; - } & { [key: string]: any }; + }; source_order_item: { /** The amount (price) for this order item. */ amount?: number | null; @@ -8203,10 +8085,10 @@ export interface components { quantity?: number; /** The type of this order item. Must be `sku`, `tax`, or `shipping`. */ type?: string | null; - } & { [key: string]: any }; + }; source_owner: { /** Owner's address. */ - address?: (Partial & { [key: string]: any }) | null; + address?: Partial | null; /** Owner's email address. */ email?: string | null; /** Owner's full name. */ @@ -8214,14 +8096,14 @@ export interface components { /** Owner's phone number (including extension). */ phone?: string | null; /** 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?: (Partial & { [key: string]: any }) | null; + verified_address?: Partial | null; /** 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; /** 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; /** 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; - } & { [key: string]: any }; + }; source_receiver_flow: { /** 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; @@ -8235,7 +8117,7 @@ export interface components { refund_attributes_method: string; /** Type of refund attribute status, one of `missing`, `requested`, or `available`. */ refund_attributes_status: string; - } & { [key: string]: any }; + }; source_redirect_flow: { /** 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; @@ -8245,7 +8127,7 @@ export interface components { status: string; /** The URL provided to you to redirect a customer to as part of a `redirect` authentication flow. */ url: string; - } & { [key: string]: any }; + }; /** * 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 @@ -8292,7 +8174,7 @@ export interface components { | "sofort" | "three_d_secure" | "wechat"; - } & { [key: string]: any }; + }; source_transaction_ach_credit_transfer_data: { /** Customer data associated with the transfer. */ customer_data?: string; @@ -8302,7 +8184,7 @@ export interface components { last4?: string; /** Routing number associated with the transfer. */ routing_number?: string; - } & { [key: string]: any }; + }; source_transaction_chf_credit_transfer_data: { /** Reference associated with the transfer. */ reference?: string; @@ -8314,7 +8196,7 @@ export interface components { sender_iban?: string; /** Sender's name. */ sender_name?: string; - } & { [key: string]: any }; + }; source_transaction_gbp_credit_transfer_data: { /** Bank account fingerprint associated with the Stripe owned bank account receiving the transfer. */ fingerprint?: string; @@ -8330,13 +8212,13 @@ export interface components { sender_name?: string; /** Sender sort code associated with the transfer. */ sender_sort_code?: string; - } & { [key: string]: any }; + }; source_transaction_paper_check_data: { /** Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch. */ available_at?: string; /** Comma-separated list of invoice IDs associated with the paper check. */ invoices?: string; - } & { [key: string]: any }; + }; source_transaction_sepa_credit_transfer_data: { /** Reference associated with the transfer. */ reference?: string; @@ -8344,7 +8226,7 @@ export interface components { sender_iban?: string; /** Sender's name. */ sender_name?: string; - } & { [key: string]: any }; + }; source_type_ach_credit_transfer: { account_number?: string | null; bank_name?: string | null; @@ -8354,7 +8236,7 @@ export interface components { refund_routing_number?: string | null; routing_number?: string | null; swift_code?: string | null; - } & { [key: string]: any }; + }; source_type_ach_debit: { bank_name?: string | null; country?: string | null; @@ -8362,17 +8244,17 @@ export interface components { last4?: string | null; routing_number?: string | null; type?: string | null; - } & { [key: string]: any }; + }; source_type_alipay: { data_string?: string | null; native_url?: string | null; statement_descriptor?: string | null; - } & { [key: string]: any }; + }; source_type_au_becs_debit: { bsb_number?: string | null; fingerprint?: string | null; last4?: string | null; - } & { [key: string]: any }; + }; source_type_bancontact: { bank_code?: string | null; bank_name?: string | null; @@ -8380,7 +8262,7 @@ export interface components { iban_last4?: string | null; preferred_language?: string | null; statement_descriptor?: string | null; - } & { [key: string]: any }; + }; source_type_card: { address_line1_check?: string | null; address_zip_check?: string | null; @@ -8396,7 +8278,7 @@ export interface components { name?: string | null; three_d_secure?: string; tokenization_method?: string | null; - } & { [key: string]: any }; + }; source_type_card_present: { application_cryptogram?: string; application_preferred_name?: string; @@ -8421,23 +8303,23 @@ export interface components { reader?: string | null; terminal_verification_results?: string; transaction_status_information?: string; - } & { [key: string]: any }; + }; source_type_eps: { reference?: string | null; statement_descriptor?: string | null; - } & { [key: string]: any }; + }; source_type_giropay: { bank_code?: string | null; bank_name?: string | null; bic?: string | null; statement_descriptor?: string | null; - } & { [key: string]: any }; + }; source_type_ideal: { bank?: string | null; bic?: string | null; iban_last4?: string | null; statement_descriptor?: string | null; - } & { [key: string]: any }; + }; source_type_klarna: { background_image_url?: string; client_token?: string | null; @@ -8464,7 +8346,7 @@ export interface components { redirect_url?: string; shipping_first_name?: string; shipping_last_name?: string; - } & { [key: string]: any }; + }; source_type_multibanco: { entity?: string | null; reference?: string | null; @@ -8476,10 +8358,10 @@ export interface components { refund_account_holder_address_state?: string | null; refund_account_holder_name?: string | null; refund_iban?: string | null; - } & { [key: string]: any }; + }; source_type_p24: { reference?: string | null; - } & { [key: string]: any }; + }; source_type_sepa_debit: { bank_code?: string | null; branch_code?: string | null; @@ -8488,7 +8370,7 @@ export interface components { last4?: string | null; mandate_reference?: string | null; mandate_url?: string | null; - } & { [key: string]: any }; + }; source_type_sofort: { bank_code?: string | null; bank_name?: string | null; @@ -8497,7 +8379,7 @@ export interface components { iban_last4?: string | null; preferred_language?: string | null; statement_descriptor?: string | null; - } & { [key: string]: any }; + }; source_type_three_d_secure: { address_line1_check?: string | null; address_zip_check?: string | null; @@ -8516,12 +8398,12 @@ export interface components { name?: string | null; three_d_secure?: string; tokenization_method?: string | null; - } & { [key: string]: any }; + }; source_type_wechat: { prepay_id?: string; qr_code_url?: string | null; statement_descriptor?: string; - } & { [key: string]: any }; + }; status_transitions: { /** The time that the order was canceled. */ canceled?: number | null; @@ -8531,7 +8413,7 @@ export interface components { paid?: number | null; /** The time that the order was returned. */ returned?: number | null; - } & { [key: string]: any }; + }; /** * Subscriptions allow you to charge a customer on a recurring basis. * @@ -8543,9 +8425,7 @@ export interface components { /** 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; /** Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ - billing_thresholds?: - | (Partial & { [key: string]: any }) - | null; + billing_thresholds?: Partial | null; /** A date in the future at which the subscription will automatically get canceled */ cancel_at?: number | null; /** 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. */ @@ -8561,28 +8441,26 @@ export interface components { /** Start of the current period that the subscription has been invoiced for. */ current_period_start: number; /** ID of the customer who owns the subscription. */ - customer: (Partial & + customer: Partial & Partial & - Partial) & { [key: string]: any }; + Partial; /** 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; /** 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?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + default_payment_method?: (Partial & Partial) | null; /** 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?: - | ((Partial & + | (Partial & Partial & Partial & Partial & Partial & - Partial) & { [key: string]: any }) + Partial) | null; /** 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; /** 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?: (Partial & { [key: string]: any }) | null; + discount?: Partial | null; /** If the subscription has ended, the date the subscription ended. */ ended_at?: number | null; /** Unique identifier for the object. */ @@ -8597,9 +8475,9 @@ export interface components { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; /** The most recent invoice this subscription has generated. */ - latest_invoice?: ((Partial & Partial) & { [key: string]: any }) | null; + latest_invoice?: (Partial & Partial) | null; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -8609,29 +8487,21 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "subscription"; /** If specified, payment collection for this subscription will be paused. */ - pause_collection?: - | (Partial & { [key: string]: any }) - | null; + pause_collection?: Partial | null; /** 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?: - | (Partial & { [key: string]: any }) - | null; + pending_invoice_item_interval?: Partial< + components["schemas"]["subscription_pending_invoice_item_interval"] + > | null; /** 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?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + pending_setup_intent?: (Partial & Partial) | null; /** 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?: - | (Partial & { [key: string]: any }) - | null; + pending_update?: Partial | null; /** Hash describing the plan the customer is subscribed to. Only set if the subscription contains a single plan. */ - plan?: (Partial & { [key: string]: any }) | null; + plan?: Partial | null; /** 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 | null; /** The schedule attached to the subscription */ - schedule?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + schedule?: (Partial & Partial) | null; /** Date when the subscription was first created. The date might differ from the `created` date due to backdating. */ start_date: number; /** @@ -8652,22 +8522,20 @@ export interface components { trial_end?: number | null; /** If the subscription has a trial, the beginning of that trial. */ trial_start?: number | null; - } & { [key: string]: any }; + }; subscription_billing_thresholds: { /** Monetary threshold that triggers the subscription to create an invoice */ amount_gte?: number | null; /** 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; - } & { [key: string]: any }; + }; /** * Subscription items allow you to create customer subscriptions with more than * one plan, making it easy to represent complex billing relationships. */ subscription_item: { /** Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period */ - billing_thresholds?: - | (Partial & { [key: string]: any }) - | null; + billing_thresholds?: Partial | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** Unique identifier for the object. */ @@ -8683,17 +8551,17 @@ export interface components { subscription: string; /** 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; - } & { [key: string]: any }; + }; subscription_item_billing_thresholds: { /** Usage threshold that triggers the subscription to create an invoice */ usage_gte?: number | null; - } & { [key: string]: any }; + }; subscription_pending_invoice_item_interval: { /** Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. */ interval: "day" | "month" | "week" | "year"; /** 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; - } & { [key: string]: any }; + }; /** * A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes. * @@ -8707,13 +8575,11 @@ export interface components { /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. */ - current_phase?: - | (Partial & { [key: string]: any }) - | null; + current_phase?: Partial | null; /** ID of the customer who owns the subscription schedule. */ - customer: (Partial & + customer: Partial & Partial & - Partial) & { [key: string]: any }; + Partial; default_settings: components["schemas"]["subscription_schedules_resource_default_settings"]; /** Behavior of the subscription schedule and underlying subscription when it ends. */ end_behavior: "cancel" | "none" | "release" | "renew"; @@ -8734,59 +8600,47 @@ export interface components { /** 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). */ status: "active" | "canceled" | "completed" | "not_started" | "released"; /** ID of the subscription managed by the subscription schedule. */ - subscription?: - | ((Partial & Partial) & { [key: string]: any }) - | null; - } & { [key: string]: any }; + subscription?: (Partial & Partial) | null; + }; /** A phase item describes the plan and quantity of a phase. */ subscription_schedule_configuration_item: { /** Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period */ - billing_thresholds?: - | (Partial & { [key: string]: any }) - | null; + billing_thresholds?: Partial | null; /** ID of the plan to which the customer should be subscribed. */ - plan: (Partial & - Partial & - Partial) & { [key: string]: any }; + plan: Partial & Partial & Partial; /** Quantity of the plan to which the customer should be subscribed. */ quantity?: number; /** 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; - } & { [key: string]: any }; + }; subscription_schedule_current_phase: { /** The end of this phase of the subscription schedule. */ end_date: number; /** The start of this phase of the subscription schedule. */ start_date: number; - } & { [key: string]: any }; + }; /** A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period. */ subscription_schedule_phase_configuration: { /** 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; /** Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ - billing_thresholds?: - | (Partial & { [key: string]: any }) - | null; + billing_thresholds?: Partial | null; /** 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. */ collection_method?: ("charge_automatically" | "send_invoice") | null; /** ID of the coupon to use during this phase of the subscription schedule. */ coupon?: - | ((Partial & + | (Partial & Partial & - Partial) & { [key: string]: any }) + Partial) | null; /** 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?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + default_payment_method?: (Partial & Partial) | null; /** The default tax rates to apply to the subscription during this phase of the subscription schedule. */ default_tax_rates?: components["schemas"]["tax_rate"][] | null; /** The end of this phase of the subscription schedule. */ end_date: number; /** The subscription schedule's default invoice settings. */ - invoice_settings?: - | (Partial & { [key: string]: any }) - | null; + invoice_settings?: Partial | null; /** Plans to subscribe during this phase of the subscription schedule. */ plans: components["schemas"]["subscription_schedule_configuration_item"][]; /** Controls whether or not the subscription schedule will prorate when transitioning to this phase. Values are `create_prorations` and `none`. */ @@ -8797,23 +8651,17 @@ export interface components { tax_percent?: number | null; /** When the trial ends within the phase. */ trial_end?: number | null; - } & { [key: string]: any }; + }; subscription_schedules_resource_default_settings: { /** Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ - billing_thresholds?: - | (Partial & { [key: string]: any }) - | null; + billing_thresholds?: Partial | null; /** 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. */ collection_method?: ("charge_automatically" | "send_invoice") | null; /** 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?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + default_payment_method?: (Partial & Partial) | null; /** The subscription schedule's default invoice settings. */ - invoice_settings?: - | (Partial & { [key: string]: any }) - | null; - } & { [key: string]: any }; + invoice_settings?: Partial | null; + }; /** * The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription * should be paused. @@ -8823,7 +8671,7 @@ export interface components { behavior: "keep_as_draft" | "mark_uncollectible" | "void"; /** The time after which the subscription will resume collecting payments. */ resumes_at?: number | null; - } & { [key: string]: any }; + }; /** * Pending Updates store the changes pending from a previous update that will be applied * to the Subscription upon successful payment. @@ -8839,7 +8687,7 @@ export interface components { trial_end?: number | null; /** 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 | null; - } & { [key: string]: any }; + }; tax_deducted_at_source: { /** Unique identifier for the object. */ id: string; @@ -8851,7 +8699,7 @@ export interface components { period_start: number; /** The TAN that was supplied to Stripe when TDS was assessed */ tax_deduction_account_number: string; - } & { [key: string]: any }; + }; /** * 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. @@ -8864,7 +8712,7 @@ export interface components { /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** ID of the customer. */ - customer: (Partial & Partial) & { [key: string]: any }; + customer: Partial & Partial; /** Unique identifier for the object. */ id: string; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -8900,7 +8748,7 @@ export interface components { /** Value of the tax ID. */ value: string; verification: components["schemas"]["tax_id_verification"]; - } & { [key: string]: any }; + }; tax_id_verification: { /** Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`. */ status: "pending" | "unavailable" | "unverified" | "verified"; @@ -8908,7 +8756,7 @@ export interface components { verified_address?: string | null; /** Verified name. */ verified_name?: string | null; - } & { [key: string]: any }; + }; /** * Tax rates can be applied to invoices and subscriptions to collect tax. * @@ -8937,7 +8785,7 @@ export interface components { object: "tax_rate"; /** This represents the tax rate percent out of 100. */ percentage: number; - } & { [key: string]: any }; + }; /** * A Connection Token is used by the Stripe Terminal SDK to connect to a reader. * @@ -8950,7 +8798,7 @@ export interface components { object: "terminal.connection_token"; /** Your application should pass this token to the Stripe Terminal SDK. */ secret: string; - } & { [key: string]: any }; + }; /** * A Location represents a grouping of readers. * @@ -8968,7 +8816,7 @@ export interface components { metadata: { [key: string]: string }; /** String representing the object's type. Objects of the same type share the same value. */ object: "terminal.location"; - } & { [key: string]: any }; + }; /** * A Reader represents a physical device for accepting payment details. * @@ -8997,7 +8845,7 @@ export interface components { serial_number: string; /** The networking status of the reader. */ status?: string | null; - } & { [key: string]: any }; + }; /** * 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 @@ -9023,7 +8871,7 @@ export interface components { redirect_url?: string | null; /** 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; - } & { [key: string]: any }; + }; three_d_secure_details: { /** Whether or not authentication was performed. 3D Secure will succeed without authentication when the card is not enrolled. */ authenticated?: boolean; @@ -9031,11 +8879,11 @@ export interface components { succeeded?: boolean; /** The version of 3D Secure that was used for this payment. */ version: string; - } & { [key: string]: any }; + }; three_d_secure_usage: { /** Whether 3D Secure is supported on this card. */ supported: boolean; - } & { [key: string]: any }; + }; /** * Tokenization is the process Stripe uses to collect sensitive card or bank * account details, or personally identifiable information (PII), directly from @@ -9077,7 +8925,7 @@ export interface components { type: string; /** Whether this token has already been used (tokens can be used only once). */ used: boolean; - } & { [key: string]: any }; + }; /** * 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 @@ -9089,9 +8937,7 @@ export interface components { /** Amount transferred. */ amount: number; /** 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?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + balance_transaction?: (Partial & Partial) | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** 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). */ @@ -9119,7 +8965,7 @@ export interface components { status: "canceled" | "failed" | "pending" | "reversed" | "succeeded"; /** A string that identifies this top-up as part of a group. */ transfer_group?: string | null; - } & { [key: string]: any }; + }; /** * A `Transfer` object is created when you move funds between Stripe accounts as * part of Connect. @@ -9138,9 +8984,7 @@ export interface components { /** Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). */ amount_reversed: number; /** Balance transaction that describes the impact of this transfer on your account balance. */ - balance_transaction?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + balance_transaction?: (Partial & Partial) | null; /** Time that this record of the transfer was first created. */ created: number; /** 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). */ @@ -9148,9 +8992,9 @@ export interface components { /** An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string | null; /** ID of the Stripe account the transfer was sent to. */ - destination?: ((Partial & Partial) & { [key: string]: any }) | null; + destination?: (Partial & Partial) | null; /** 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?: (Partial & Partial) & { [key: string]: any }; + destination_payment?: Partial & Partial; /** Unique identifier for the object. */ id: string; /** Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -9169,18 +9013,16 @@ export interface components { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; /** Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. */ reversed: boolean; /** 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?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + source_transaction?: (Partial & Partial) | null; /** The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. */ source_type?: string | null; /** 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; - } & { [key: string]: any }; + }; transfer_data: { /** 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; @@ -9189,8 +9031,8 @@ export interface components { * reporting, and where funds from the payment will be transferred to upon * payment success. */ - destination: (Partial & Partial) & { [key: string]: any }; - } & { [key: string]: any }; + destination: Partial & Partial; + }; /** * [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 @@ -9210,17 +9052,13 @@ export interface components { /** Amount, in %s. */ amount: number; /** Balance transaction that describes the impact on your account balance. */ - balance_transaction?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + balance_transaction?: (Partial & Partial) | null; /** Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** 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; /** Linked payment refund for the transfer reversal. */ - destination_payment_refund?: - | ((Partial & Partial) & { [key: string]: any }) - | null; + destination_payment_refund?: (Partial & Partial) | null; /** Unique identifier for the object. */ id: 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. */ @@ -9228,10 +9066,10 @@ export interface components { /** String representing the object's type. Objects of the same type share the same value. */ object: "transfer_reversal"; /** ID of the refund responsible for the transfer reversal. */ - source_refund?: ((Partial & Partial) & { [key: string]: any }) | null; + source_refund?: (Partial & Partial) | null; /** ID of the transfer that was reversed. */ - transfer: (Partial & Partial) & { [key: string]: any }; - } & { [key: string]: any }; + transfer: Partial & Partial; + }; transfer_schedule: { /** The number of days charges for the account will be held before being paid out. */ delay_days: number; @@ -9241,13 +9079,13 @@ export interface components { monthly_anchor?: number; /** 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; - } & { [key: string]: any }; + }; transform_usage: { /** Divide usage by this number. */ divide_by: number; /** After division, either round the result `up` or `down`. */ round: "down" | "up"; - } & { [key: string]: any }; + }; /** * Usage records allow you to report customer usage and metrics to Stripe for * metered billing of subscription plans. @@ -9267,7 +9105,7 @@ export interface components { subscription_item: string; /** The timestamp when this usage occurred. */ timestamp: number; - } & { [key: string]: any }; + }; usage_record_summary: { /** Unique identifier for the object. */ id: string; @@ -9282,7 +9120,7 @@ export interface components { subscription_item: string; /** The total usage within this usage period. */ total_usage: number; - } & { [key: string]: any }; + }; /** * 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 @@ -9317,7 +9155,7 @@ export interface components { status: string; /** The URL of the webhook endpoint. */ url: string; - } & { [key: string]: any }; + }; }; } @@ -9442,18 +9280,16 @@ export interface operations { /** An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ account_token?: string; /** 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?: (Partial< - { - account_holder_name?: string; - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - object?: "bank_account"; - routing_number?: string; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + bank_account?: Partial<{ + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + }> & + Partial; /** Business information about the account. */ business_profile?: { mcc?: string; @@ -9463,7 +9299,7 @@ export interface operations { support_phone?: string; support_url?: string; url?: string; - } & { [key: string]: any }; + }; /** The business type. */ business_type?: "company" | "government_entity" | "individual" | "non_profit"; /** Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`. */ @@ -9475,7 +9311,7 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; address_kana?: { city?: string; country?: string; @@ -9484,7 +9320,7 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; address_kanji?: { city?: string; country?: string; @@ -9493,7 +9329,7 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; directors_provided?: boolean; executives_provided?: boolean; name?: string; @@ -9525,9 +9361,9 @@ export interface operations { document?: { back?: string; front?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; + }; /** 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; /** 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. */ @@ -9545,7 +9381,7 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; address_kana?: { city?: string; country?: string; @@ -9554,7 +9390,7 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; address_kanji?: { city?: string; country?: string; @@ -9563,15 +9399,13 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; - dob?: (Partial< - { - day: number; - month: number; - year: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + }; + dob?: Partial<{ + day: number; + month: number; + year: number; + }> & + Partial<"">; email?: string; first_name?: string; first_name_kana?: string; @@ -9582,22 +9416,22 @@ export interface operations { last_name_kana?: string; last_name_kanji?: string; maiden_name?: string; - metadata?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; phone?: string; ssn_last_4?: string; verification?: { additional_document?: { back?: string; front?: string; - } & { [key: string]: any }; + }; document?: { back?: string; front?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; + }; /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** 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" @@ -9615,36 +9449,36 @@ export interface operations { logo?: string; primary_color?: string; secondary_color?: string; - } & { [key: string]: any }; + }; card_payments?: { decline_on?: { avs_failure?: boolean; cvc_failure?: boolean; - } & { [key: string]: any }; + }; statement_descriptor_prefix?: string; - } & { [key: string]: any }; + }; payments?: { statement_descriptor?: string; statement_descriptor_kana?: string; statement_descriptor_kanji?: string; - } & { [key: string]: any }; + }; payouts?: { debit_negative_balances?: boolean; schedule?: { - delay_days?: (Partial<"minimum"> & Partial) & { [key: string]: any }; + delay_days?: Partial<"minimum"> & Partial; interval?: "daily" | "manual" | "monthly" | "weekly"; monthly_anchor?: number; weekly_anchor?: "friday" | "monday" | "saturday" | "sunday" | "thursday" | "tuesday" | "wednesday"; - } & { [key: string]: any }; + }; statement_descriptor?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** 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; - } & { [key: string]: any }; + }; }; }; }; @@ -9699,18 +9533,16 @@ export interface operations { content: { "application/x-www-form-urlencoded": { /** 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?: (Partial< - { - account_holder_name?: string; - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - object?: "bank_account"; - routing_number?: string; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + bank_account?: Partial<{ + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + }> & + Partial; /** 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; /** Specifies which fields in the response should be expanded. */ @@ -9806,7 +9638,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** Cardholder name. */ name?: string; }; @@ -9860,7 +9692,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -9959,16 +9791,14 @@ export interface operations { content: { "application/json": { /** The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ - data: ((Partial & Partial) & { - [key: string]: any; - })[]; + data: (Partial & Partial)[]; /** True if this list has another page of items after this one that can be fetched. */ has_more: boolean; /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -10004,18 +9834,16 @@ export interface operations { content: { "application/x-www-form-urlencoded": { /** 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?: (Partial< - { - account_holder_name?: string; - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - object?: "bank_account"; - routing_number?: string; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + bank_account?: Partial<{ + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + }> & + Partial; /** 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; /** Specifies which fields in the response should be expanded. */ @@ -10111,7 +9939,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** Cardholder name. */ name?: string; }; @@ -10223,7 +10051,7 @@ export interface operations { executive?: boolean; owner?: boolean; representative?: boolean; - } & { [key: string]: any }; + }; /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string; }; @@ -10240,7 +10068,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -10284,7 +10112,7 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; /** The Kana variation of the person's address (Japan only). */ address_kana?: { city?: string; @@ -10294,7 +10122,7 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; /** The Kanji variation of the person's address (Japan only). */ address_kanji?: { city?: string; @@ -10304,16 +10132,14 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; /** The person's date of birth. */ - dob?: (Partial< - { - day: number; - month: number; - year: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + dob?: Partial<{ + day: number; + month: number; + year: number; + }> & + Partial<"">; /** The person's email address. */ email?: string; /** Specifies which fields in the response should be expanded. */ @@ -10337,7 +10163,7 @@ export interface operations { /** The person's maiden name. */ maiden_name?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ person_token?: string; /** The person's phone number. */ @@ -10347,10 +10173,10 @@ export interface operations { director?: boolean; executive?: boolean; owner?: boolean; - percent_ownership?: (Partial & Partial<"">) & { [key: string]: any }; + percent_ownership?: Partial & Partial<"">; representative?: boolean; title?: string; - } & { [key: string]: any }; + }; /** The last 4 digits of the person's social security number. */ ssn_last_4?: string; /** The person's verification status. */ @@ -10358,12 +10184,12 @@ export interface operations { additional_document?: { back?: string; front?: string; - } & { [key: string]: any }; + }; document?: { back?: string; front?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; }; }; }; @@ -10432,7 +10258,7 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; /** The Kana variation of the person's address (Japan only). */ address_kana?: { city?: string; @@ -10442,7 +10268,7 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; /** The Kanji variation of the person's address (Japan only). */ address_kanji?: { city?: string; @@ -10452,16 +10278,14 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; /** The person's date of birth. */ - dob?: (Partial< - { - day: number; - month: number; - year: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + dob?: Partial<{ + day: number; + month: number; + year: number; + }> & + Partial<"">; /** The person's email address. */ email?: string; /** Specifies which fields in the response should be expanded. */ @@ -10485,7 +10309,7 @@ export interface operations { /** The person's maiden name. */ maiden_name?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ person_token?: string; /** The person's phone number. */ @@ -10495,10 +10319,10 @@ export interface operations { director?: boolean; executive?: boolean; owner?: boolean; - percent_ownership?: (Partial & Partial<"">) & { [key: string]: any }; + percent_ownership?: Partial & Partial<"">; representative?: boolean; title?: string; - } & { [key: string]: any }; + }; /** The last 4 digits of the person's social security number. */ ssn_last_4?: string; /** The person's verification status. */ @@ -10506,12 +10330,12 @@ export interface operations { additional_document?: { back?: string; front?: string; - } & { [key: string]: any }; + }; document?: { back?: string; front?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; }; }; }; @@ -10559,7 +10383,7 @@ export interface operations { executive?: boolean; owner?: boolean; representative?: boolean; - } & { [key: string]: any }; + }; /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string; }; @@ -10576,7 +10400,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -10620,7 +10444,7 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; /** The Kana variation of the person's address (Japan only). */ address_kana?: { city?: string; @@ -10630,7 +10454,7 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; /** The Kanji variation of the person's address (Japan only). */ address_kanji?: { city?: string; @@ -10640,16 +10464,14 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; /** The person's date of birth. */ - dob?: (Partial< - { - day: number; - month: number; - year: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + dob?: Partial<{ + day: number; + month: number; + year: number; + }> & + Partial<"">; /** The person's email address. */ email?: string; /** Specifies which fields in the response should be expanded. */ @@ -10673,7 +10495,7 @@ export interface operations { /** The person's maiden name. */ maiden_name?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ person_token?: string; /** The person's phone number. */ @@ -10683,10 +10505,10 @@ export interface operations { director?: boolean; executive?: boolean; owner?: boolean; - percent_ownership?: (Partial & Partial<"">) & { [key: string]: any }; + percent_ownership?: Partial & Partial<"">; representative?: boolean; title?: string; - } & { [key: string]: any }; + }; /** The last 4 digits of the person's social security number. */ ssn_last_4?: string; /** The person's verification status. */ @@ -10694,12 +10516,12 @@ export interface operations { additional_document?: { back?: string; front?: string; - } & { [key: string]: any }; + }; document?: { back?: string; front?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; }; }; }; @@ -10768,7 +10590,7 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; /** The Kana variation of the person's address (Japan only). */ address_kana?: { city?: string; @@ -10778,7 +10600,7 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; /** The Kanji variation of the person's address (Japan only). */ address_kanji?: { city?: string; @@ -10788,16 +10610,14 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; /** The person's date of birth. */ - dob?: (Partial< - { - day: number; - month: number; - year: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + dob?: Partial<{ + day: number; + month: number; + year: number; + }> & + Partial<"">; /** The person's email address. */ email?: string; /** Specifies which fields in the response should be expanded. */ @@ -10821,7 +10641,7 @@ export interface operations { /** The person's maiden name. */ maiden_name?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ person_token?: string; /** The person's phone number. */ @@ -10831,10 +10651,10 @@ export interface operations { director?: boolean; executive?: boolean; owner?: boolean; - percent_ownership?: (Partial & Partial<"">) & { [key: string]: any }; + percent_ownership?: Partial & Partial<"">; representative?: boolean; title?: string; - } & { [key: string]: any }; + }; /** The last 4 digits of the person's social security number. */ ssn_last_4?: string; /** The person's verification status. */ @@ -10842,12 +10662,12 @@ export interface operations { additional_document?: { back?: string; front?: string; - } & { [key: string]: any }; + }; document?: { back?: string; front?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; }; }; }; @@ -10918,15 +10738,13 @@ export interface operations { GetAccounts: { parameters: { query: { - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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. */ @@ -10949,7 +10767,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -10993,18 +10811,16 @@ export interface operations { /** An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ account_token?: string; /** 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?: (Partial< - { - account_holder_name?: string; - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - object?: "bank_account"; - routing_number?: string; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + bank_account?: Partial<{ + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + }> & + Partial; /** Business information about the account. */ business_profile?: { mcc?: string; @@ -11014,7 +10830,7 @@ export interface operations { support_phone?: string; support_url?: string; url?: string; - } & { [key: string]: any }; + }; /** The business type. */ business_type?: "company" | "government_entity" | "individual" | "non_profit"; /** Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`. */ @@ -11026,7 +10842,7 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; address_kana?: { city?: string; country?: string; @@ -11035,7 +10851,7 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; address_kanji?: { city?: string; country?: string; @@ -11044,7 +10860,7 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; directors_provided?: boolean; executives_provided?: boolean; name?: string; @@ -11076,9 +10892,9 @@ export interface operations { document?: { back?: string; front?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; + }; /** 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; /** 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). */ @@ -11098,7 +10914,7 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; address_kana?: { city?: string; country?: string; @@ -11107,7 +10923,7 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; address_kanji?: { city?: string; country?: string; @@ -11116,15 +10932,13 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; - dob?: (Partial< - { - day: number; - month: number; - year: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + }; + dob?: Partial<{ + day: number; + month: number; + year: number; + }> & + Partial<"">; email?: string; first_name?: string; first_name_kana?: string; @@ -11135,22 +10949,22 @@ export interface operations { last_name_kana?: string; last_name_kanji?: string; maiden_name?: string; - metadata?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; phone?: string; ssn_last_4?: string; verification?: { additional_document?: { back?: string; front?: string; - } & { [key: string]: any }; + }; document?: { back?: string; front?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; + }; /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** 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" @@ -11168,36 +10982,36 @@ export interface operations { logo?: string; primary_color?: string; secondary_color?: string; - } & { [key: string]: any }; + }; card_payments?: { decline_on?: { avs_failure?: boolean; cvc_failure?: boolean; - } & { [key: string]: any }; + }; statement_descriptor_prefix?: string; - } & { [key: string]: any }; + }; payments?: { statement_descriptor?: string; statement_descriptor_kana?: string; statement_descriptor_kanji?: string; - } & { [key: string]: any }; + }; payouts?: { debit_negative_balances?: boolean; schedule?: { - delay_days?: (Partial<"minimum"> & Partial) & { [key: string]: any }; + delay_days?: Partial<"minimum"> & Partial; interval?: "daily" | "manual" | "monthly" | "weekly"; monthly_anchor?: number; weekly_anchor?: "friday" | "monday" | "saturday" | "sunday" | "thursday" | "tuesday" | "wednesday"; - } & { [key: string]: any }; + }; statement_descriptor?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** 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; - } & { [key: string]: any }; + }; /** 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. */ type?: "custom" | "express" | "standard"; }; @@ -11266,18 +11080,16 @@ export interface operations { /** An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ account_token?: string; /** 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?: (Partial< - { - account_holder_name?: string; - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - object?: "bank_account"; - routing_number?: string; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + bank_account?: Partial<{ + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + }> & + Partial; /** Business information about the account. */ business_profile?: { mcc?: string; @@ -11287,7 +11099,7 @@ export interface operations { support_phone?: string; support_url?: string; url?: string; - } & { [key: string]: any }; + }; /** The business type. */ business_type?: "company" | "government_entity" | "individual" | "non_profit"; /** Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`. */ @@ -11299,7 +11111,7 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; address_kana?: { city?: string; country?: string; @@ -11308,7 +11120,7 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; address_kanji?: { city?: string; country?: string; @@ -11317,7 +11129,7 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; directors_provided?: boolean; executives_provided?: boolean; name?: string; @@ -11349,9 +11161,9 @@ export interface operations { document?: { back?: string; front?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; + }; /** 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; /** 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. */ @@ -11369,7 +11181,7 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; address_kana?: { city?: string; country?: string; @@ -11378,7 +11190,7 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; address_kanji?: { city?: string; country?: string; @@ -11387,15 +11199,13 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; - dob?: (Partial< - { - day: number; - month: number; - year: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + }; + dob?: Partial<{ + day: number; + month: number; + year: number; + }> & + Partial<"">; email?: string; first_name?: string; first_name_kana?: string; @@ -11406,22 +11216,22 @@ export interface operations { last_name_kana?: string; last_name_kanji?: string; maiden_name?: string; - metadata?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; phone?: string; ssn_last_4?: string; verification?: { additional_document?: { back?: string; front?: string; - } & { [key: string]: any }; + }; document?: { back?: string; front?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; + }; /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** 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" @@ -11439,36 +11249,36 @@ export interface operations { logo?: string; primary_color?: string; secondary_color?: string; - } & { [key: string]: any }; + }; card_payments?: { decline_on?: { avs_failure?: boolean; cvc_failure?: boolean; - } & { [key: string]: any }; + }; statement_descriptor_prefix?: string; - } & { [key: string]: any }; + }; payments?: { statement_descriptor?: string; statement_descriptor_kana?: string; statement_descriptor_kanji?: string; - } & { [key: string]: any }; + }; payouts?: { debit_negative_balances?: boolean; schedule?: { - delay_days?: (Partial<"minimum"> & Partial) & { [key: string]: any }; + delay_days?: Partial<"minimum"> & Partial; interval?: "daily" | "manual" | "monthly" | "weekly"; monthly_anchor?: number; weekly_anchor?: "friday" | "monday" | "saturday" | "sunday" | "thursday" | "tuesday" | "wednesday"; - } & { [key: string]: any }; + }; statement_descriptor?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** 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; - } & { [key: string]: any }; + }; }; }; }; @@ -11531,18 +11341,16 @@ export interface operations { content: { "application/x-www-form-urlencoded": { /** 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?: (Partial< - { - account_holder_name?: string; - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - object?: "bank_account"; - routing_number?: string; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + bank_account?: Partial<{ + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + }> & + Partial; /** 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; /** Specifies which fields in the response should be expanded. */ @@ -11640,7 +11448,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** Cardholder name. */ name?: string; }; @@ -11698,7 +11506,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -11802,16 +11610,14 @@ export interface operations { content: { "application/json": { /** The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ - data: ((Partial & Partial) & { - [key: string]: any; - })[]; + data: (Partial & Partial)[]; /** True if this list has another page of items after this one that can be fetched. */ has_more: boolean; /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -11852,18 +11658,16 @@ export interface operations { content: { "application/x-www-form-urlencoded": { /** 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?: (Partial< - { - account_holder_name?: string; - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - object?: "bank_account"; - routing_number?: string; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + bank_account?: Partial<{ + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + }> & + Partial; /** 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; /** Specifies which fields in the response should be expanded. */ @@ -11961,7 +11765,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** Cardholder name. */ name?: string; }; @@ -12085,7 +11889,7 @@ export interface operations { executive?: boolean; owner?: boolean; representative?: boolean; - } & { [key: string]: any }; + }; /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string; }; @@ -12102,7 +11906,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -12150,7 +11954,7 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; /** The Kana variation of the person's address (Japan only). */ address_kana?: { city?: string; @@ -12160,7 +11964,7 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; /** The Kanji variation of the person's address (Japan only). */ address_kanji?: { city?: string; @@ -12170,16 +11974,14 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; /** The person's date of birth. */ - dob?: (Partial< - { - day: number; - month: number; - year: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + dob?: Partial<{ + day: number; + month: number; + year: number; + }> & + Partial<"">; /** The person's email address. */ email?: string; /** Specifies which fields in the response should be expanded. */ @@ -12203,7 +12005,7 @@ export interface operations { /** The person's maiden name. */ maiden_name?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ person_token?: string; /** The person's phone number. */ @@ -12213,10 +12015,10 @@ export interface operations { director?: boolean; executive?: boolean; owner?: boolean; - percent_ownership?: (Partial & Partial<"">) & { [key: string]: any }; + percent_ownership?: Partial & Partial<"">; representative?: boolean; title?: string; - } & { [key: string]: any }; + }; /** The last 4 digits of the person's social security number. */ ssn_last_4?: string; /** The person's verification status. */ @@ -12224,12 +12026,12 @@ export interface operations { additional_document?: { back?: string; front?: string; - } & { [key: string]: any }; + }; document?: { back?: string; front?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; }; }; }; @@ -12299,7 +12101,7 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; /** The Kana variation of the person's address (Japan only). */ address_kana?: { city?: string; @@ -12309,7 +12111,7 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; /** The Kanji variation of the person's address (Japan only). */ address_kanji?: { city?: string; @@ -12319,16 +12121,14 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; /** The person's date of birth. */ - dob?: (Partial< - { - day: number; - month: number; - year: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + dob?: Partial<{ + day: number; + month: number; + year: number; + }> & + Partial<"">; /** The person's email address. */ email?: string; /** Specifies which fields in the response should be expanded. */ @@ -12352,7 +12152,7 @@ export interface operations { /** The person's maiden name. */ maiden_name?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ person_token?: string; /** The person's phone number. */ @@ -12362,10 +12162,10 @@ export interface operations { director?: boolean; executive?: boolean; owner?: boolean; - percent_ownership?: (Partial & Partial<"">) & { [key: string]: any }; + percent_ownership?: Partial & Partial<"">; representative?: boolean; title?: string; - } & { [key: string]: any }; + }; /** The last 4 digits of the person's social security number. */ ssn_last_4?: string; /** The person's verification status. */ @@ -12373,12 +12173,12 @@ export interface operations { additional_document?: { back?: string; front?: string; - } & { [key: string]: any }; + }; document?: { back?: string; front?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; }; }; }; @@ -12430,7 +12230,7 @@ export interface operations { executive?: boolean; owner?: boolean; representative?: boolean; - } & { [key: string]: any }; + }; /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string; }; @@ -12447,7 +12247,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -12495,7 +12295,7 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; /** The Kana variation of the person's address (Japan only). */ address_kana?: { city?: string; @@ -12505,7 +12305,7 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; /** The Kanji variation of the person's address (Japan only). */ address_kanji?: { city?: string; @@ -12515,16 +12315,14 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; /** The person's date of birth. */ - dob?: (Partial< - { - day: number; - month: number; - year: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + dob?: Partial<{ + day: number; + month: number; + year: number; + }> & + Partial<"">; /** The person's email address. */ email?: string; /** Specifies which fields in the response should be expanded. */ @@ -12548,7 +12346,7 @@ export interface operations { /** The person's maiden name. */ maiden_name?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ person_token?: string; /** The person's phone number. */ @@ -12558,10 +12356,10 @@ export interface operations { director?: boolean; executive?: boolean; owner?: boolean; - percent_ownership?: (Partial & Partial<"">) & { [key: string]: any }; + percent_ownership?: Partial & Partial<"">; representative?: boolean; title?: string; - } & { [key: string]: any }; + }; /** The last 4 digits of the person's social security number. */ ssn_last_4?: string; /** The person's verification status. */ @@ -12569,12 +12367,12 @@ export interface operations { additional_document?: { back?: string; front?: string; - } & { [key: string]: any }; + }; document?: { back?: string; front?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; }; }; }; @@ -12644,7 +12442,7 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; /** The Kana variation of the person's address (Japan only). */ address_kana?: { city?: string; @@ -12654,7 +12452,7 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; /** The Kanji variation of the person's address (Japan only). */ address_kanji?: { city?: string; @@ -12664,16 +12462,14 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; /** The person's date of birth. */ - dob?: (Partial< - { - day: number; - month: number; - year: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + dob?: Partial<{ + day: number; + month: number; + year: number; + }> & + Partial<"">; /** The person's email address. */ email?: string; /** Specifies which fields in the response should be expanded. */ @@ -12697,7 +12493,7 @@ export interface operations { /** The person's maiden name. */ maiden_name?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ person_token?: string; /** The person's phone number. */ @@ -12707,10 +12503,10 @@ export interface operations { director?: boolean; executive?: boolean; owner?: boolean; - percent_ownership?: (Partial & Partial<"">) & { [key: string]: any }; + percent_ownership?: Partial & Partial<"">; representative?: boolean; title?: string; - } & { [key: string]: any }; + }; /** The last 4 digits of the person's social security number. */ ssn_last_4?: string; /** The person's verification status. */ @@ -12718,12 +12514,12 @@ export interface operations { additional_document?: { back?: string; front?: string; - } & { [key: string]: any }; + }; document?: { back?: string; front?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; }; }; }; @@ -12819,7 +12615,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -12925,15 +12721,13 @@ export interface operations { query: { /** Only return application fees for the charge specified by this charge ID. */ charge?: string; - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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. */ @@ -12956,7 +12750,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -13036,7 +12830,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; }; }; }; @@ -13133,7 +12927,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -13232,24 +13026,20 @@ export interface operations { GetBalanceHistory: { parameters: { query: { - available_on?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + available_on?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** 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. */ @@ -13280,7 +13070,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -13339,24 +13129,20 @@ export interface operations { GetBalanceTransactions: { parameters: { query: { - available_on?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + available_on?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** 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. */ @@ -13387,7 +13173,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -13499,7 +13285,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -13578,7 +13364,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -13624,7 +13410,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -13644,15 +13430,13 @@ export interface operations { GetCharges: { parameters: { query: { - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** 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. */ @@ -13681,7 +13465,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -13724,41 +13508,37 @@ export interface operations { /** 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; /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ - card?: (Partial< - { - 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; - object?: "card"; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + card?: Partial<{ + 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; + object?: "card"; + }> & + Partial; /** 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; /** The ID of an existing customer that will be charged in this request. */ customer?: string; /** 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?: (Partial< - { - account: string; - amount?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + destination?: Partial<{ + account: string; + amount?: number; + }> & + Partial; /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** 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; /** 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). */ @@ -13772,12 +13552,12 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; carrier?: string; name: string; phone?: string; tracking_number?: string; - } & { [key: string]: any }; + }; /** 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; /** 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. */ @@ -13788,7 +13568,7 @@ export interface operations { transfer_data?: { amount?: number; destination: string; - } & { [key: string]: any }; + }; /** 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; }; @@ -13859,9 +13639,9 @@ export interface operations { /** 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?: { user_report: "" | "fraudulent" | "safe"; - } & { [key: string]: any }; + }; /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** 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 information for the charge. Helps prevent fraud on charges for physical goods. */ @@ -13873,12 +13653,12 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; carrier?: string; name: string; phone?: string; tracking_number?: string; - } & { [key: string]: any }; + }; /** 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; }; @@ -13930,7 +13710,7 @@ export interface operations { /** 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; - } & { [key: string]: any }; + }; /** 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; }; @@ -14020,11 +13800,11 @@ export interface operations { shipping_tracking_number?: string; uncategorized_file?: string; uncategorized_text?: string; - } & { [key: string]: any }; + }; /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** 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; }; @@ -14100,7 +13880,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; payment_intent?: string; reason?: "duplicate" | "fraudulent" | "requested_by_customer"; refund_application_fee?: boolean; @@ -14139,7 +13919,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -14183,7 +13963,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; payment_intent?: string; reason?: "duplicate" | "fraudulent" | "requested_by_customer"; refund_application_fee?: boolean; @@ -14251,7 +14031,7 @@ export interface operations { "application/x-www-form-urlencoded": { /** Specifies which fields in the response should be expanded. */ expand?: string[]; - metadata?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; }; }; }; @@ -14286,7 +14066,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -14356,7 +14136,7 @@ export interface operations { * one-time payments or adding invoice line items to a subscription (used * in conjunction with `subscription_data`). */ - line_items?: ({ + line_items?: { amount?: number; currency?: string; description?: string; @@ -14364,7 +14144,7 @@ export interface operations { name?: string; quantity: number; tax_rates?: string[]; - } & { [key: string]: any })[]; + }[]; /** The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. */ locale?: | "auto" @@ -14405,19 +14185,19 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; carrier?: string; name: string; phone?: string; tracking_number?: string; - } & { [key: string]: any }; + }; statement_descriptor?: string; statement_descriptor_suffix?: string; transfer_data?: { amount?: number; destination: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** A list of the types of payment methods (e.g., card) this Checkout session can accept. */ payment_method_types: ("card" | "fpx" | "ideal")[]; /** A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. */ @@ -14425,7 +14205,7 @@ export interface operations { description?: string; metadata?: { [key: string]: string }; on_behalf_of?: string; - } & { [key: string]: any }; + }; /** When set, provides configuration for Checkout to collect a shipping address from a customer. */ shipping_address_collection?: { allowed_countries: ( @@ -14667,7 +14447,7 @@ export interface operations { | "ZW" | "ZZ" )[]; - } & { [key: string]: any }; + }; /** * 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 @@ -14679,16 +14459,16 @@ export interface operations { subscription_data?: { application_fee_percent?: number; default_tax_rates?: string[]; - items?: ({ + items?: { plan: string; quantity?: number; tax_rates?: string[]; - } & { [key: string]: any })[]; + }[]; metadata?: { [key: string]: string }; trial_end?: number; trial_from_plan?: boolean; trial_period_days?: number; - } & { [key: string]: any }; + }; /** * The URL to which Stripe should send customers when payment or setup * is complete. @@ -14758,7 +14538,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -14810,15 +14590,13 @@ export interface operations { 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?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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. */ @@ -14841,7 +14619,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -14895,7 +14673,7 @@ export interface operations { /** 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; /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** 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; /** 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). */ @@ -14964,7 +14742,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** 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; }; @@ -15028,7 +14806,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -15087,16 +14865,16 @@ export interface operations { /** ID of the invoice. */ invoice: string; /** Line items that make up the credit note. */ - lines?: ({ + lines?: { amount?: number; description?: string; invoice_line_item?: string; quantity?: number; - tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; + tax_rates?: Partial & Partial<"">; type: "custom_line_item" | "invoice_line_item"; unit_amount?: number; unit_amount_decimal?: string; - } & { [key: string]: any })[]; + }[]; /** 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`. */ @@ -15126,16 +14904,16 @@ export interface operations { /** ID of the invoice. */ invoice: string; /** Line items that make up the credit note. */ - lines?: ({ + lines?: { amount?: number; description?: string; invoice_line_item?: string; quantity?: number; - tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; + tax_rates?: Partial & Partial<"">; type: "custom_line_item" | "invoice_line_item"; unit_amount?: number; unit_amount_decimal?: string; - } & { [key: string]: any })[]; + }[]; /** 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`. */ @@ -15187,16 +14965,16 @@ export interface operations { /** 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?: ({ + lines?: { amount?: number; description?: string; invoice_line_item?: string; quantity?: number; - tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; + tax_rates?: Partial & Partial<"">; type: "custom_line_item" | "invoice_line_item"; unit_amount?: number; unit_amount_decimal?: string; - } & { [key: string]: any })[]; + }[]; /** 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`. */ @@ -15226,7 +15004,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -15272,7 +15050,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -15387,15 +15165,13 @@ export interface operations { GetCustomers: { parameters: { query: { - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** 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. */ @@ -15420,7 +15196,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -15456,17 +15232,15 @@ export interface operations { content: { "application/x-www-form-urlencoded": { /** The customer's address. */ - address?: (Partial< - { - city?: string; - country?: string; - line1: string; - line2?: string; - postal_code?: string; - state?: string; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + address?: Partial<{ + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + }> & + Partial<"">; /** 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; @@ -15480,18 +15254,18 @@ export interface operations { invoice_prefix?: string; /** Default invoice settings for this customer. */ invoice_settings?: { - custom_fields?: (Partial< - ({ + custom_fields?: Partial< + { name: string; value: string; - } & { [key: string]: any })[] + }[] > & - Partial<"">) & { [key: string]: any }; + Partial<"">; default_payment_method?: string; footer?: string; - } & { [key: string]: any }; + }; /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** The customer's full name or business name. */ name?: string; /** The sequence to be used on the customer's next invoice. Defaults to 1. */ @@ -15502,26 +15276,24 @@ export interface operations { /** Customer's preferred languages, ordered by preference. */ preferred_locales?: string[]; /** The customer's shipping information. Appears on invoices emailed to this customer. */ - shipping?: (Partial< - { - address: { - city?: string; - country?: string; - line1: string; - line2?: string; - postal_code?: string; - state?: string; - } & { [key: string]: any }; - name: string; - phone?: string; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + shipping?: Partial<{ + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + }; + name: string; + phone?: string; + }> & + Partial<"">; source?: string; /** The customer's tax exemption. One of `none`, `exempt`, or `reverse`. */ tax_exempt?: "" | "exempt" | "none" | "reverse"; /** The customer's tax IDs. */ - tax_id_data?: ({ + tax_id_data?: { type: | "au_abn" | "ca_bn" @@ -15547,7 +15319,7 @@ export interface operations { | "us_ein" | "za_vat"; value: string; - } & { [key: string]: any })[]; + }[]; }; }; }; @@ -15567,8 +15339,8 @@ export interface operations { /** Successful response. */ 200: { content: { - "application/json": (Partial & - Partial) & { [key: string]: any }; + "application/json": Partial & + Partial; }; }; /** Error response. */ @@ -15613,51 +15385,45 @@ export interface operations { content: { "application/x-www-form-urlencoded": { /** The customer's address. */ - address?: (Partial< - { - city?: string; - country?: string; - line1: string; - line2?: string; - postal_code?: string; - state?: string; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + address?: Partial<{ + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + }> & + Partial<"">; /** 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; /** 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?: (Partial< - { - account_holder_name?: string; - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - object?: "bank_account"; - routing_number?: string; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + bank_account?: Partial<{ + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + }> & + Partial; /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ - card?: (Partial< - { - 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; - object?: "card"; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + card?: Partial<{ + 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; + object?: "card"; + }> & + Partial; coupon?: string; /** ID of Alipay account to make the customer's new default for invoice payments. */ default_alipay_account?: string; @@ -15683,18 +15449,18 @@ export interface operations { invoice_prefix?: string; /** Default invoice settings for this customer. */ invoice_settings?: { - custom_fields?: (Partial< - ({ + custom_fields?: Partial< + { name: string; value: string; - } & { [key: string]: any })[] + }[] > & - Partial<"">) & { [key: string]: any }; + Partial<"">; default_payment_method?: string; footer?: string; - } & { [key: string]: any }; + }; /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** The customer's full name or business name. */ name?: string; /** The sequence to be used on the customer's next invoice. Defaults to 1. */ @@ -15704,26 +15470,24 @@ export interface operations { /** Customer's preferred languages, ordered by preference. */ preferred_locales?: string[]; /** The customer's shipping information. Appears on invoices emailed to this customer. */ - shipping?: (Partial< - { - address: { - city?: string; - country?: string; - line1: string; - line2?: string; - postal_code?: string; - state?: string; - } & { [key: string]: any }; - name: string; - phone?: string; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + shipping?: Partial<{ + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + }; + name: string; + phone?: string; + }> & + Partial<"">; source?: string; /** The customer's tax exemption. One of `none`, `exempt`, or `reverse`. */ tax_exempt?: "" | "exempt" | "none" | "reverse"; /** 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?: (Partial<"now"> & Partial) & { [key: string]: any }; + trial_end?: Partial<"now"> & Partial; }; }; }; @@ -15785,7 +15549,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -15834,7 +15598,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; }; }; }; @@ -15901,7 +15665,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; }; }; }; @@ -15936,7 +15700,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -15985,37 +15749,33 @@ export interface operations { /** A token returned by [Stripe.js](https://stripe.com/docs/stripe.js) representing the user’s Alipay account details. */ alipay_account?: string; /** 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?: (Partial< - { - account_holder_name?: string; - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - object?: "bank_account"; - routing_number?: string; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + bank_account?: Partial<{ + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + }> & + Partial; /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ - card?: (Partial< - { - 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; - object?: "card"; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + card?: Partial<{ + 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; + object?: "card"; + }> & + Partial; /** Specifies which fields in the response should be expanded. */ expand?: 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`. */ @@ -16070,9 +15830,9 @@ export interface operations { /** Successful response. */ 200: { content: { - "application/json": (Partial & + "application/json": Partial & Partial & - Partial) & { [key: string]: any }; + Partial; }; }; /** Error response. */ @@ -16108,7 +15868,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** Cardholder name. */ name?: string; owner?: { @@ -16119,11 +15879,11 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; email?: string; name?: string; phone?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -16140,8 +15900,8 @@ export interface operations { /** Successful response. */ 200: { content: { - "application/json": (Partial & - Partial) & { [key: string]: any }; + "application/json": Partial & + Partial; }; }; /** Error response. */ @@ -16226,7 +15986,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -16275,37 +16035,33 @@ export interface operations { /** A token returned by [Stripe.js](https://stripe.com/docs/stripe.js) representing the user’s Alipay account details. */ alipay_account?: string; /** 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?: (Partial< - { - account_holder_name?: string; - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - object?: "bank_account"; - routing_number?: string; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + bank_account?: Partial<{ + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + }> & + Partial; /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ - card?: (Partial< - { - 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; - object?: "card"; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + card?: Partial<{ + 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; + object?: "card"; + }> & + Partial; /** Specifies which fields in the response should be expanded. */ expand?: 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`. */ @@ -16360,9 +16116,9 @@ export interface operations { /** Successful response. */ 200: { content: { - "application/json": (Partial & + "application/json": Partial & Partial & - Partial) & { [key: string]: any }; + Partial; }; }; /** Error response. */ @@ -16398,7 +16154,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** Cardholder name. */ name?: string; owner?: { @@ -16409,11 +16165,11 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; email?: string; name?: string; phone?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -16430,8 +16186,8 @@ export interface operations { /** Successful response. */ 200: { content: { - "application/json": (Partial & - Partial) & { [key: string]: any }; + "application/json": Partial & + Partial; }; }; /** Error response. */ @@ -16532,18 +16288,18 @@ export interface operations { content: { "application/json": { /** Details about each object. */ - data: ((Partial & + data: (Partial & Partial & Partial & Partial & - Partial) & { [key: string]: any })[]; + Partial)[]; /** True if this list has another page of items after this one that can be fetched. */ has_more: boolean; /** String representing the object's type. Objects of the same type share the same value. Always has the value `list`. */ object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -16592,37 +16348,33 @@ export interface operations { /** A token returned by [Stripe.js](https://stripe.com/docs/stripe.js) representing the user’s Alipay account details. */ alipay_account?: string; /** 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?: (Partial< - { - account_holder_name?: string; - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - object?: "bank_account"; - routing_number?: string; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + bank_account?: Partial<{ + account_holder_name?: string; + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + object?: "bank_account"; + routing_number?: string; + }> & + Partial; /** A token, like the ones returned by [Stripe.js](https://stripe.com/docs/stripe.js). */ - card?: (Partial< - { - 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; - object?: "card"; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + card?: Partial<{ + 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; + object?: "card"; + }> & + Partial; /** Specifies which fields in the response should be expanded. */ expand?: 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`. */ @@ -16677,9 +16429,9 @@ export interface operations { /** Successful response. */ 200: { content: { - "application/json": (Partial & + "application/json": Partial & Partial & - Partial) & { [key: string]: any }; + Partial; }; }; /** Error response. */ @@ -16715,7 +16467,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** Cardholder name. */ name?: string; owner?: { @@ -16726,11 +16478,11 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; email?: string; name?: string; phone?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -16747,8 +16499,8 @@ export interface operations { /** Successful response. */ 200: { content: { - "application/json": (Partial & - Partial) & { [key: string]: any }; + "application/json": Partial & + Partial; }; }; /** Error response. */ @@ -16830,7 +16582,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -16877,13 +16629,11 @@ export interface operations { /** 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; /** 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?: (Partial< - { - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + billing_thresholds?: Partial<{ + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + }> & + Partial<"">; /** 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; /** Boolean indicating whether this subscription should cancel at the end of the current period. */ @@ -16899,24 +16649,22 @@ export interface operations { /** 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; /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + default_tax_rates?: Partial & Partial<"">; /** Specifies which fields in the response should be expanded. */ expand?: string[]; /** A list of up to 20 subscription items, each with an attached plan. */ - items?: ({ - billing_thresholds?: (Partial< - { - usage_gte: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + items?: { + billing_thresholds?: Partial<{ + usage_gte: number; + }> & + Partial<"">; metadata?: { [key: string]: string }; plan?: string; quantity?: number; - tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; - } & { [key: string]: any })[]; + tax_rates?: Partial & Partial<"">; + }[]; /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ off_session?: boolean; /** @@ -16928,13 +16676,11 @@ export interface operations { */ payment_behavior?: "allow_incomplete" | "error_if_incomplete" | "pending_if_incomplete"; /** 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?: (Partial< - { - interval: "day" | "month" | "week" | "year"; - interval_count?: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + pending_invoice_item_interval?: Partial<{ + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + }> & + Partial<"">; /** 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; /** @@ -16944,9 +16690,9 @@ export interface operations { */ proration_behavior?: "always_invoice" | "create_prorations" | "none"; /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + tax_percent?: Partial & Partial<"">; /** 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?: (Partial<"now"> & Partial) & { [key: string]: any }; + trial_end?: Partial<"now"> & Partial; /** 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; /** 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. */ @@ -17017,15 +16763,13 @@ export interface operations { /** 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). */ billing_cycle_anchor?: "now" | "unchanged"; /** 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?: (Partial< - { - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + billing_thresholds?: Partial<{ + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + }> & + Partial<"">; /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + cancel_at?: Partial & Partial<"">; /** Boolean indicating whether this subscription should cancel at the end of the current period. */ cancel_at_period_end?: boolean; /** 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`. */ @@ -17039,37 +16783,33 @@ export interface operations { /** 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; /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + default_tax_rates?: Partial & Partial<"">; /** Specifies which fields in the response should be expanded. */ expand?: string[]; /** List of subscription items, each with an attached plan. */ - items?: ({ - billing_thresholds?: (Partial< - { - usage_gte: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + items?: { + billing_thresholds?: Partial<{ + usage_gte: number; + }> & + Partial<"">; clear_usage?: boolean; deleted?: boolean; id?: string; - metadata?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; plan?: string; quantity?: number; - tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; - } & { [key: string]: any })[]; + tax_rates?: Partial & Partial<"">; + }[]; /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ off_session?: boolean; /** If specified, payment collection for this subscription will be paused. */ - pause_collection?: (Partial< - { - behavior: "keep_as_draft" | "mark_uncollectible" | "void"; - resumes_at?: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + pause_collection?: Partial<{ + behavior: "keep_as_draft" | "mark_uncollectible" | "void"; + resumes_at?: number; + }> & + Partial<"">; /** * 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. * @@ -17079,13 +16819,11 @@ export interface operations { */ payment_behavior?: "allow_incomplete" | "error_if_incomplete" | "pending_if_incomplete"; /** 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?: (Partial< - { - interval: "day" | "month" | "week" | "year"; - interval_count?: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + pending_invoice_item_interval?: Partial<{ + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + }> & + Partial<"">; /** 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; /** @@ -17099,9 +16837,9 @@ export interface operations { /** 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; /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + tax_percent?: Partial & Partial<"">; /** 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?: (Partial<"now"> & Partial) & { [key: string]: any }; + trial_end?: Partial<"now"> & Partial; /** 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; }; @@ -17238,7 +16976,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -17377,15 +17115,13 @@ export interface operations { query: { /** Only return disputes associated to the charge specified by this charge ID. */ charge?: string; - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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. */ @@ -17410,7 +17146,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -17514,11 +17250,11 @@ export interface operations { shipping_tracking_number?: string; uncategorized_file?: string; uncategorized_text?: string; - } & { [key: string]: any }; + }; /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** 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; }; @@ -17622,15 +17358,13 @@ export interface operations { GetEvents: { parameters: { query: { - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** 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. */ @@ -17659,7 +17393,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -17732,7 +17466,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -17783,15 +17517,13 @@ export interface operations { GetFileLinks: { parameters: { query: { - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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. */ @@ -17818,7 +17550,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -17860,7 +17592,7 @@ export interface operations { /** 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; /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; }; }; }; @@ -17923,9 +17655,9 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: string[]; /** A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. */ - expires_at?: (Partial<"now"> & Partial & Partial<"">) & { [key: string]: any }; + expires_at?: Partial<"now"> & Partial & Partial<"">; /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; }; }; }; @@ -17934,15 +17666,13 @@ export interface operations { GetFiles: { parameters: { query: { - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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. */ @@ -17977,7 +17707,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -18024,8 +17754,8 @@ export interface operations { file_link_data?: { create: boolean; expires_at?: number; - metadata?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; - } & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; + }; /** 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`. */ purpose: | "additional_verification" @@ -18075,15 +17805,13 @@ export interface operations { GetInvoiceitems: { parameters: { query: { - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** 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. */ @@ -18112,7 +17840,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -18162,12 +17890,12 @@ export interface operations { /** 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; /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** The period associated with this invoice item. */ period?: { end: number; start: number; - } & { [key: string]: any }; + }; /** Non-negative integer. The quantity of units for the invoice item. */ quantity?: number; /** 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. */ @@ -18246,16 +17974,16 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** The period associated with this invoice item. */ period?: { end: number; start: number; - } & { [key: string]: any }; + }; /** Non-negative integer. The quantity of units for the invoice item. */ quantity?: number; /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + tax_rates?: Partial & Partial<"">; /** 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; /** 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. */ @@ -18297,26 +18025,22 @@ export interface operations { query: { /** The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`. */ collection_method?: "charge_automatically" | "send_invoice"; - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** Only return invoices for the customer specified by this customer ID. */ customer?: string; - due_date?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + due_date?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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. */ @@ -18343,7 +18067,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -18385,13 +18109,13 @@ export interface operations { /** 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`. */ collection_method?: "charge_automatically" | "send_invoice"; /** A list of up to 4 custom fields to be displayed on the invoice. */ - custom_fields?: (Partial< - ({ + custom_fields?: Partial< + { name: string; value: string; - } & { [key: string]: any })[] + }[] > & - Partial<"">) & { [key: string]: any }; + Partial<"">; /** The ID of the customer who will be billed. */ customer: string; /** The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`. */ @@ -18411,7 +18135,7 @@ export interface operations { /** Footer to be displayed on the invoice. */ footer?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** 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; /** 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. */ @@ -18439,52 +18163,50 @@ export interface operations { /** 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?: ({ + invoice_items?: { amount?: number; currency?: string; description?: string; discountable?: boolean; invoiceitem?: string; - metadata?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; period?: { end: number; start: number; - } & { [key: string]: any }; + }; quantity?: number; - tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; + tax_rates?: Partial & Partial<"">; unit_amount?: number; unit_amount_decimal?: string; - } & { [key: string]: any })[]; + }[]; /** 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?: (Partial<"now" | "unchanged"> & Partial) & { [key: string]: any }; + subscription_billing_cycle_anchor?: Partial<"now" | "unchanged"> & Partial; /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + subscription_cancel_at?: Partial & Partial<"">; /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + subscription_default_tax_rates?: Partial & Partial<"">; /** List of subscription items, each with an attached plan. */ - subscription_items?: ({ - billing_thresholds?: (Partial< - { - usage_gte: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + subscription_items?: { + billing_thresholds?: Partial<{ + usage_gte: number; + }> & + Partial<"">; clear_usage?: boolean; deleted?: boolean; id?: string; - metadata?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; plan?: string; quantity?: number; - tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; - } & { [key: string]: any })[]; + tax_rates?: Partial & Partial<"">; + }[]; /** 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; /** @@ -18502,7 +18224,7 @@ export interface operations { /** 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?: (Partial<"now"> & Partial) & { [key: string]: any }; + subscription_trial_end?: Partial<"now"> & Partial; /** 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; }; @@ -18540,22 +18262,22 @@ export interface operations { /** 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?: ({ + invoice_items?: { amount?: number; currency?: string; description?: string; discountable?: boolean; invoiceitem?: string; - metadata?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; period?: { end: number; start: number; - } & { [key: string]: any }; + }; quantity?: number; - tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; + tax_rates?: Partial & Partial<"">; unit_amount?: number; unit_amount_decimal?: string; - } & { [key: string]: any })[]; + }[]; /** 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. */ @@ -18565,31 +18287,29 @@ export interface operations { /** 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?: (Partial<"now" | "unchanged"> & Partial) & { [key: string]: any }; + subscription_billing_cycle_anchor?: Partial<"now" | "unchanged"> & Partial; /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + subscription_cancel_at?: Partial & Partial<"">; /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + subscription_default_tax_rates?: Partial & Partial<"">; /** List of subscription items, each with an attached plan. */ - subscription_items?: ({ - billing_thresholds?: (Partial< - { - usage_gte: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + subscription_items?: { + billing_thresholds?: Partial<{ + usage_gte: number; + }> & + Partial<"">; clear_usage?: boolean; deleted?: boolean; id?: string; - metadata?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; plan?: string; quantity?: number; - tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; - } & { [key: string]: any })[]; + tax_rates?: Partial & Partial<"">; + }[]; /** 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; /** @@ -18607,7 +18327,7 @@ export interface operations { /** 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?: (Partial<"now"> & Partial) & { [key: string]: any }; + subscription_trial_end?: Partial<"now"> & Partial; /** 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; }; @@ -18625,7 +18345,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -18710,13 +18430,13 @@ export interface operations { /** Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices. */ collection_method?: "charge_automatically" | "send_invoice"; /** 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?: (Partial< - ({ + custom_fields?: Partial< + { name: string; value: string; - } & { [key: string]: any })[] + }[] > & - Partial<"">) & { [key: string]: any }; + Partial<"">; /** 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; /** 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. */ @@ -18724,7 +18444,7 @@ export interface operations { /** 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; /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + default_tax_rates?: Partial & Partial<"">; /** An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ description?: string; /** 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. */ @@ -18734,11 +18454,11 @@ export interface operations { /** Footer to be displayed on the invoice. */ footer?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** 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; /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + tax_percent?: Partial & Partial<"">; }; }; }; @@ -18832,7 +18552,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -19014,7 +18734,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -19074,15 +18794,13 @@ export interface operations { /** Only return authorizations belonging to the given cardholder. */ cardholder?: string; /** Only return authorizations that were created during the given date interval. */ - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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. */ @@ -19107,7 +18825,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -19181,7 +18899,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; }; }; }; @@ -19215,7 +18933,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; }; }; }; @@ -19247,7 +18965,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; }; }; }; @@ -19257,15 +18975,13 @@ export interface operations { parameters: { query: { /** Only return cardholders that were created during the given date interval. */ - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** 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. */ @@ -19296,7 +19012,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -19340,12 +19056,12 @@ export interface operations { line2?: string; postal_code: string; state?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** Additional information about a `company` cardholder. */ company?: { tax_id?: string; - } & { [key: string]: any }; + }; /** The cardholder's email address. */ email?: string; /** Specifies which fields in the response should be expanded. */ @@ -19356,16 +19072,16 @@ export interface operations { day: number; month: number; year: number; - } & { [key: string]: any }; + }; first_name: string; last_name: string; verification?: { document?: { back?: string; front?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; + }; /** Set of key-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]: string }; /** The cardholder's name. This will be printed on cards issued to them. */ @@ -19954,7 +19670,7 @@ export interface operations { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[]; - spending_limits?: ({ + spending_limits?: { amount: number; categories?: ( | "ac_refrigeration_repair" @@ -20247,9 +19963,9 @@ export interface operations { | "wrecking_and_salvage_yards" )[]; interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; - } & { [key: string]: any })[]; + }[]; spending_limits_currency?: string; - } & { [key: string]: any }; + }; /** Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`. */ status?: "active" | "inactive"; /** One of `individual` or `company`. */ @@ -20322,12 +20038,12 @@ export interface operations { line2?: string; postal_code: string; state?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** Additional information about a `company` cardholder. */ company?: { tax_id?: string; - } & { [key: string]: any }; + }; /** The cardholder's email address. */ email?: string; /** Specifies which fields in the response should be expanded. */ @@ -20338,16 +20054,16 @@ export interface operations { day: number; month: number; year: number; - } & { [key: string]: any }; + }; first_name: string; last_name: string; verification?: { document?: { back?: string; front?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; + }; /** Set of key-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]: string }; /** The cardholder's phone number. */ @@ -20934,7 +20650,7 @@ export interface operations { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[]; - spending_limits?: ({ + spending_limits?: { amount: number; categories?: ( | "ac_refrigeration_repair" @@ -21227,9 +20943,9 @@ export interface operations { | "wrecking_and_salvage_yards" )[]; interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; - } & { [key: string]: any })[]; + }[]; spending_limits_currency?: string; - } & { [key: string]: any }; + }; /** Specifies whether to permit authorizations on this cardholder's cards. */ status?: "active" | "inactive"; }; @@ -21243,15 +20959,13 @@ export interface operations { /** 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?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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. */ @@ -21284,7 +20998,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -21340,11 +21054,11 @@ export interface operations { line2?: string; postal_code: string; state?: string; - } & { [key: string]: any }; + }; name: string; service?: "express" | "priority" | "standard"; type?: "bulk" | "individual"; - } & { [key: string]: any }; + }; /** 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?: ( @@ -21927,7 +21641,7 @@ export interface operations { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[]; - spending_limits?: ({ + spending_limits?: { amount: number; categories?: ( | "ac_refrigeration_repair" @@ -22220,8 +21934,8 @@ export interface operations { | "wrecking_and_salvage_yards" )[]; interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; /** Whether authorizations can be approved on this card. Defaults to `inactive`. */ status?: "active" | "inactive"; /** The type of card to issue. Possible values are `physical` or `virtual`. */ @@ -22290,7 +22004,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** 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?: ( @@ -22873,7 +22587,7 @@ export interface operations { | "womens_ready_to_wear_stores" | "wrecking_and_salvage_yards" )[]; - spending_limits?: ({ + spending_limits?: { amount: number; categories?: ( | "ac_refrigeration_repair" @@ -23166,8 +22880,8 @@ export interface operations { | "wrecking_and_salvage_yards" )[]; interval: "all_time" | "daily" | "monthly" | "per_authorization" | "weekly" | "yearly"; - } & { [key: string]: any })[]; - } & { [key: string]: any }; + }[]; + }; /** 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`. */ status?: "active" | "canceled" | "inactive"; }; @@ -23200,7 +22914,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -23311,15 +23025,13 @@ export interface operations { parameters: { query: { /** Only return issuing settlements that were created during the given date interval. */ - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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. */ @@ -23342,7 +23054,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -23430,15 +23142,13 @@ export interface operations { /** Only return transactions that belong to the given cardholder. */ cardholder?: string; /** Only return transactions that were created during the given date interval. */ - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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. */ @@ -23461,7 +23171,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -23535,7 +23245,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; }; }; }; @@ -23576,15 +23286,13 @@ export interface operations { parameters: { query: { /** Date this return was created. */ - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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. */ @@ -23609,7 +23317,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -23661,15 +23369,13 @@ export interface operations { parameters: { query: { /** Date this order was created. */ - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** 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. */ @@ -23686,43 +23392,35 @@ export interface operations { status?: string; /** Filter orders based on when they were paid, fulfilled, canceled, or returned. */ status_transitions?: { - canceled?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; - fulfilled?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; - paid?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; - returned?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; - } & { [key: string]: any }; + canceled?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; + fulfilled?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; + paid?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; + returned?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; + }; /** Only return orders with the given upstream order IDs. */ upstream_ids?: string[]; }; @@ -23739,7 +23437,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -23785,14 +23483,14 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: string[]; /** List of items constituting the order. An order can have up to 25 items. */ - items?: ({ + items?: { amount?: number; currency?: string; description?: string; parent?: string; quantity?: number; type?: "discount" | "shipping" | "sku" | "tax"; - } & { [key: string]: any })[]; + }[]; /** Set of key-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]: string }; /** Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. */ @@ -23804,10 +23502,10 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; name: string; phone?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -23872,14 +23570,14 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** 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; /** Tracking information once the order has been fulfilled. */ shipping?: { carrier: string; tracking_number: string; - } & { [key: string]: any }; + }; /** 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). */ status?: "canceled" | "created" | "fulfilled" | "paid" | "returned"; }; @@ -23953,16 +23651,16 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: string[]; /** List of items to return. */ - items?: (Partial< - ({ + items?: Partial< + { amount?: number; description?: string; parent?: string; quantity?: number; type?: "discount" | "shipping" | "sku" | "tax"; - } & { [key: string]: any })[] + }[] > & - Partial<"">) & { [key: string]: any }; + Partial<"">; }; }; }; @@ -23972,15 +23670,13 @@ export interface operations { 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?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** 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. */ @@ -24005,7 +23701,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -24090,14 +23786,14 @@ export interface operations { online?: { ip_address: string; user_agent: string; - } & { [key: string]: any }; + }; type: "offline" | "online"; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** Set of key-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]: string }; /** 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?: (Partial & Partial<"one_off" | "recurring">) & { [key: string]: any }; + off_session?: Partial & Partial<"one_off" | "recurring">; /** 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; /** @@ -24108,24 +23804,20 @@ export interface operations { payment_method?: string; /** Payment-method-specific configuration for this PaymentIntent. */ payment_method_options?: { - card?: (Partial< - { - installments?: { - enabled?: boolean; - plan?: (Partial< - { - count: number; - interval: "month"; - type: "fixed_count"; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; - } & { [key: string]: any }; - request_three_d_secure?: "any" | "automatic"; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; - } & { [key: string]: any }; + card?: Partial<{ + installments?: { + enabled?: boolean; + plan?: Partial<{ + count: number; + interval: "month"; + type: "fixed_count"; + }> & + Partial<"">; + }; + request_three_d_secure?: "any" | "automatic"; + }> & + Partial<"">; + }; /** 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[]; /** Email address that the receipt for the resulting payment will be sent to. */ @@ -24149,12 +23841,12 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; carrier?: string; name: string; phone?: string; tracking_number?: string; - } & { [key: string]: any }; + }; /** 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; /** 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. */ @@ -24166,7 +23858,7 @@ export interface operations { transfer_data?: { amount?: number; destination: string; - } & { [key: string]: any }; + }; /** 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; /** Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ @@ -24249,7 +23941,7 @@ export interface operations { /** 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; /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + application_fee_amount?: Partial & Partial<"">; /** 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; /** @@ -24265,33 +23957,29 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** 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-specific configuration for this PaymentIntent. */ payment_method_options?: { - card?: (Partial< - { - installments?: { - enabled?: boolean; - plan?: (Partial< - { - count: number; - interval: "month"; - type: "fixed_count"; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; - } & { [key: string]: any }; - request_three_d_secure?: "any" | "automatic"; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; - } & { [key: string]: any }; + card?: Partial<{ + installments?: { + enabled?: boolean; + plan?: Partial<{ + count: number; + interval: "month"; + type: "fixed_count"; + }> & + Partial<"">; + }; + request_three_d_secure?: "any" | "automatic"; + }> & + Partial<"">; + }; /** The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ payment_method_types?: string[]; /** Email address that the receipt for the resulting payment will be sent to. */ - receipt_email?: (Partial & Partial<"">) & { [key: string]: any }; + receipt_email?: Partial & Partial<"">; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -24303,23 +23991,21 @@ export interface operations { */ setup_future_usage?: "" | "off_session" | "on_session"; /** Shipping information for this PaymentIntent. */ - shipping?: (Partial< - { - address: { - city?: string; - country?: string; - line1: string; - line2?: string; - postal_code?: string; - state?: string; - } & { [key: string]: any }; - carrier?: string; - name: string; - phone?: string; - tracking_number?: string; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + shipping?: Partial<{ + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + }; + carrier?: string; + name: string; + phone?: string; + tracking_number?: string; + }> & + Partial<"">; /** 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; /** 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. */ @@ -24327,7 +24013,7 @@ export interface operations { /** 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; - } & { [key: string]: any }; + }; /** 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; }; @@ -24420,7 +24106,7 @@ export interface operations { */ transfer_data?: { amount?: number; - } & { [key: string]: any }; + }; }; }; }; @@ -24484,58 +24170,50 @@ export interface operations { /** ID of the mandate to be used for this payment. */ mandate?: string; /** This hash contains details about the Mandate to create */ - mandate_data?: (Partial< - { + mandate_data?: Partial<{ + customer_acceptance: { + accepted_at?: number; + offline?: { [key: string]: any }; + online?: { + ip_address: string; + user_agent: string; + }; + type: "offline" | "online"; + }; + }> & + Partial<{ customer_acceptance: { - accepted_at?: number; - offline?: { [key: string]: any }; - online?: { - ip_address: string; - user_agent: string; - } & { [key: string]: any }; - type: "offline" | "online"; - } & { [key: string]: any }; - } & { [key: string]: any } - > & - Partial< - { - customer_acceptance: { - online: { - ip_address?: string; - user_agent?: string; - } & { [key: string]: any }; - type: "online"; - } & { [key: string]: any }; - } & { [key: string]: any } - >) & { [key: string]: any }; + online: { + ip_address?: string; + user_agent?: string; + }; + type: "online"; + }; + }>; /** 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?: (Partial & Partial<"one_off" | "recurring">) & { [key: string]: any }; + off_session?: Partial & Partial<"one_off" | "recurring">; /** 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-specific configuration for this PaymentIntent. */ payment_method_options?: { - card?: (Partial< - { - installments?: { - enabled?: boolean; - plan?: (Partial< - { - count: number; - interval: "month"; - type: "fixed_count"; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; - } & { [key: string]: any }; - request_three_d_secure?: "any" | "automatic"; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; - } & { [key: string]: any }; + card?: Partial<{ + installments?: { + enabled?: boolean; + plan?: Partial<{ + count: number; + interval: "month"; + type: "fixed_count"; + }> & + Partial<"">; + }; + request_three_d_secure?: "any" | "automatic"; + }> & + Partial<"">; + }; /** The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ payment_method_types?: string[]; /** Email address that the receipt for the resulting payment will be sent to. */ - receipt_email?: (Partial & Partial<"">) & { [key: string]: any }; + receipt_email?: Partial & Partial<"">; /** * 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. @@ -24553,23 +24231,21 @@ export interface operations { */ setup_future_usage?: "" | "off_session" | "on_session"; /** Shipping information for this PaymentIntent. */ - shipping?: (Partial< - { - address: { - city?: string; - country?: string; - line1: string; - line2?: string; - postal_code?: string; - state?: string; - } & { [key: string]: any }; - carrier?: string; - name: string; - phone?: string; - tracking_number?: string; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + shipping?: Partial<{ + address: { + city?: string; + country?: string; + line1: string; + line2?: string; + postal_code?: string; + state?: string; + }; + carrier?: string; + name: string; + phone?: string; + tracking_number?: string; + }> & + Partial<"">; /** Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ use_stripe_sdk?: boolean; }; @@ -24606,7 +24282,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -24645,7 +24321,7 @@ export interface operations { au_becs_debit?: { account_number: string; bsb_number: string; - } & { [key: string]: any }; + }; /** Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. */ billing_details?: { address?: { @@ -24655,25 +24331,21 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; email?: string; name?: string; phone?: string; - } & { [key: string]: any }; + }; /** 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?: (Partial< - { - cvc?: string; - exp_month: number; - exp_year: number; - number: string; - } & { [key: string]: any } - > & - Partial< - { - token: string; - } & { [key: string]: any } - >) & { [key: string]: any }; + card?: Partial<{ + cvc?: string; + exp_month: number; + exp_year: number; + number: string; + }> & + Partial<{ + token: string; + }>; /** The `Customer` to whom the original PaymentMethod is attached. */ customer?: string; /** Specifies which fields in the response should be expanded. */ @@ -24701,7 +24373,7 @@ export interface operations { | "rhb" | "standard_chartered" | "uob"; - } & { [key: string]: any }; + }; /** If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. */ ideal?: { bank?: @@ -24717,7 +24389,7 @@ export interface operations { | "sns_bank" | "triodos_bank" | "van_lanschot"; - } & { [key: string]: any }; + }; /** Set of key-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]: string }; /** The PaymentMethod to share. */ @@ -24725,7 +24397,7 @@ export interface operations { /** If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. */ sepa_debit?: { iban: string; - } & { [key: string]: any }; + }; /** 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) */ type?: "au_becs_debit" | "card" | "fpx" | "ideal" | "sepa_debit"; }; @@ -24796,20 +24468,20 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; email?: string; name?: string; phone?: string; - } & { [key: string]: any }; + }; /** If this is a `card` PaymentMethod, this hash contains the user's card details. */ card?: { exp_month?: number; exp_year?: number; - } & { [key: string]: any }; + }; /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. */ sepa_debit?: { [key: string]: any }; }; @@ -24894,24 +24566,20 @@ export interface operations { GetPayouts: { parameters: { query: { - arrival_date?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + arrival_date?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** 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. */ @@ -24938,7 +24606,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -25059,7 +24727,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; }; }; }; @@ -25101,15 +24769,13 @@ export interface operations { /** 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?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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. */ @@ -25134,7 +24800,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -25190,35 +24856,33 @@ export interface operations { /** 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; /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** A brief description of the plan, hidden from customers. */ nickname?: string; - product?: (Partial< - { - active?: boolean; - id?: string; - metadata?: { [key: string]: string }; - name: string; - statement_descriptor?: string; - unit_label?: string; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + product?: Partial<{ + active?: boolean; + id?: string; + metadata?: { [key: string]: string }; + name: string; + statement_descriptor?: string; + unit_label?: string; + }> & + Partial; /** Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ - tiers?: ({ + tiers?: { flat_amount?: number; flat_amount_decimal?: string; unit_amount?: number; unit_amount_decimal?: string; - up_to: (Partial<"inf"> & Partial) & { [key: string]: any }; - } & { [key: string]: any })[]; + up_to: Partial<"inf"> & Partial; + }[]; /** 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. */ tiers_mode?: "graduated" | "volume"; /** 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; round: "down" | "up"; - } & { [key: string]: any }; + }; /** 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; /** 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`. */ @@ -25287,7 +24951,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** A brief description of the plan, hidden from customers. */ nickname?: string; /** The product the plan belongs to. Note that after updating, statement descriptors and line items of the plan in active subscriptions will be affected. */ @@ -25332,15 +24996,13 @@ export interface operations { /** 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?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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. */ @@ -25371,7 +25033,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -25432,7 +25094,7 @@ export interface operations { length: number; weight: number; width: number; - } & { [key: string]: any }; + }; /** Whether this product is shipped (i.e., physical goods). Defaults to `true`. May only be set if type=`good`. */ shippable?: boolean; /** @@ -25510,7 +25172,7 @@ export interface operations { /** Whether the product is available for purchase. */ active?: boolean; /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + attributes?: Partial & Partial<"">; /** A short one-line description of the product, meant to be displayable to the customer. May only be set if `type=good`. */ caption?: string; /** 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`. */ @@ -25520,21 +25182,19 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: string[]; /** A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - images?: (Partial & Partial<"">) & { [key: string]: any }; + images?: Partial & Partial<"">; /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** 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; /** 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?: (Partial< - { - height: number; - length: number; - weight: number; - width: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + package_dimensions?: Partial<{ + height: number; + length: number; + weight: number; + width: number; + }> & + Partial<"">; /** Whether this product is shipped (i.e., physical goods). Defaults to `true`. May only be set if `type=good`. */ shippable?: boolean; /** @@ -25607,7 +25267,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -25662,15 +25322,13 @@ export interface operations { GetRadarValueListItems: { parameters: { query: { - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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. */ @@ -25697,7 +25355,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -25808,15 +25466,13 @@ export interface operations { alias?: string; /** A value contained within a value list - returns all value lists containing this value. */ contains?: string; - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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. */ @@ -25839,7 +25495,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -25993,15 +25649,13 @@ export interface operations { GetRecipients: { parameters: { query: { - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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. */ @@ -26027,7 +25681,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -26076,7 +25730,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** 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; /** The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ @@ -26102,8 +25756,8 @@ export interface operations { /** Successful response. */ 200: { content: { - "application/json": (Partial & - Partial) & { [key: string]: any }; + "application/json": Partial & + Partial; }; }; /** Error response. */ @@ -26162,7 +25816,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** 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; /** The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ @@ -26204,15 +25858,13 @@ export interface operations { query: { /** Only return refunds for the charge specified by this charge ID. */ charge?: string; - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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. */ @@ -26237,7 +25889,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -26277,7 +25929,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; payment_intent?: string; reason?: "duplicate" | "fraudulent" | "requested_by_customer"; refund_application_fee?: boolean; @@ -26348,7 +26000,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; }; }; }; @@ -26357,15 +26009,13 @@ export interface operations { GetReportingReportRuns: { parameters: { query: { - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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. */ @@ -26388,7 +26038,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -27060,7 +26710,7 @@ export interface operations { | "W-SU" | "WET" | "Zulu"; - } & { [key: string]: any }; + }; /** 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; }; @@ -27118,7 +26768,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -27169,15 +26819,13 @@ export interface operations { GetReviews: { parameters: { query: { - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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. */ @@ -27200,7 +26848,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -27282,15 +26930,13 @@ export interface operations { 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?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** 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. */ @@ -27317,7 +26963,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -27377,10 +27023,10 @@ export interface operations { online?: { ip_address: string; user_agent: string; - } & { [key: string]: any }; + }; type: "offline" | "online"; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** Set of key-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]: string }; /** The Stripe account ID for which this SetupIntent is created. */ @@ -27391,8 +27037,8 @@ export interface operations { payment_method_options?: { card?: { request_three_d_secure?: "any" | "automatic"; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** 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[]; /** 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). */ @@ -27401,7 +27047,7 @@ export interface operations { single_use?: { amount: number; currency: string; - } & { [key: string]: any }; + }; /** Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. */ usage?: "off_session" | "on_session"; }; @@ -27482,15 +27128,15 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ payment_method?: string; /** Payment-method-specific configuration for this SetupIntent. */ payment_method_options?: { card?: { request_three_d_secure?: "any" | "automatic"; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** 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[]; }; @@ -27576,38 +27222,34 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: string[]; /** This hash contains details about the Mandate to create */ - mandate_data?: (Partial< - { + mandate_data?: Partial<{ + customer_acceptance: { + accepted_at?: number; + offline?: { [key: string]: any }; + online?: { + ip_address: string; + user_agent: string; + }; + type: "offline" | "online"; + }; + }> & + Partial<{ customer_acceptance: { - accepted_at?: number; - offline?: { [key: string]: any }; - online?: { - ip_address: string; - user_agent: string; - } & { [key: string]: any }; - type: "offline" | "online"; - } & { [key: string]: any }; - } & { [key: string]: any } - > & - Partial< - { - customer_acceptance: { - online: { - ip_address?: string; - user_agent?: string; - } & { [key: string]: any }; - type: "online"; - } & { [key: string]: any }; - } & { [key: string]: any } - >) & { [key: string]: any }; + online: { + ip_address?: string; + user_agent?: string; + }; + type: "online"; + }; + }>; /** ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ payment_method?: string; /** Payment-method-specific configuration for this SetupIntent. */ payment_method_options?: { card?: { request_three_d_secure?: "any" | "automatic"; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** * 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. @@ -27644,7 +27286,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -27727,7 +27369,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -27779,7 +27421,7 @@ export interface operations { quantity?: number; type?: "bucket" | "finite" | "infinite"; value?: "" | "in_stock" | "limited" | "out_of_stock"; - } & { [key: string]: any }; + }; /** Set of key-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]: string }; /** The dimensions of this SKU for shipping purposes. */ @@ -27788,7 +27430,7 @@ export interface operations { length: number; weight: number; width: number; - } & { [key: string]: any }; + }; /** 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; /** The ID of the product this SKU is associated with. Must be a product with type `good`. */ @@ -27812,8 +27454,7 @@ export interface operations { /** Successful response. */ 200: { content: { - "application/json": (Partial & - Partial) & { [key: string]: any }; + "application/json": Partial & Partial; }; }; /** Error response. */ @@ -27872,19 +27513,17 @@ export interface operations { quantity?: number; type?: "bucket" | "finite" | "infinite"; value?: "" | "in_stock" | "limited" | "out_of_stock"; - } & { [key: string]: any }; + }; /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** The dimensions of this SKU for shipping purposes. */ - package_dimensions?: (Partial< - { - height: number; - length: number; - weight: number; - width: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + package_dimensions?: Partial<{ + height: number; + length: number; + weight: number; + width: number; + }> & + Partial<"">; /** 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; /** 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`. */ @@ -27956,21 +27595,21 @@ export interface operations { ip?: string; offline?: { contact_email: string; - } & { [key: string]: any }; + }; online?: { date?: number; ip?: string; user_agent?: string; - } & { [key: string]: any }; + }; status: "accepted" | "pending" | "refused" | "revoked"; type?: "offline" | "online"; user_agent?: string; - } & { [key: string]: any }; - amount?: (Partial & Partial<"">) & { [key: string]: any }; + }; + amount?: Partial & Partial<"">; currency?: string; interval?: "one_time" | "scheduled" | "variable"; notification_method?: "deprecated_none" | "email" | "manual" | "none" | "stripe_email"; - } & { [key: string]: any }; + }; metadata?: { [key: string]: string }; /** The source to share. */ original_source?: string; @@ -27983,29 +27622,29 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; email?: string; name?: string; phone?: string; - } & { [key: string]: any }; + }; /** Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). */ receiver?: { refund_attributes_method?: "email" | "manual" | "none"; - } & { [key: string]: any }; + }; /** Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). */ redirect?: { return_url: string; - } & { [key: string]: any }; + }; /** 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?: ({ + items?: { amount?: number; currency?: string; description?: string; parent?: string; quantity?: number; type?: "discount" | "shipping" | "sku" | "tax"; - } & { [key: string]: any })[]; + }[]; shipping?: { address: { city?: string; @@ -28014,13 +27653,13 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; carrier?: string; name?: string; phone?: string; tracking_number?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** 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; /** An optional token used to create the source. When passed, token properties will override source parameters. */ @@ -28104,23 +27743,23 @@ export interface operations { ip?: string; offline?: { contact_email: string; - } & { [key: string]: any }; + }; online?: { date?: number; ip?: string; user_agent?: string; - } & { [key: string]: any }; + }; status: "accepted" | "pending" | "refused" | "revoked"; type?: "offline" | "online"; user_agent?: string; - } & { [key: string]: any }; - amount?: (Partial & Partial<"">) & { [key: string]: any }; + }; + amount?: Partial & Partial<"">; currency?: string; interval?: "one_time" | "scheduled" | "variable"; notification_method?: "deprecated_none" | "email" | "manual" | "none" | "stripe_email"; - } & { [key: string]: any }; + }; /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** Information about the owner of the payment instrument that may be used or required by particular source types. */ owner?: { address?: { @@ -28130,21 +27769,21 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; email?: string; name?: string; phone?: string; - } & { [key: string]: any }; + }; /** 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?: ({ + items?: { amount?: number; currency?: string; description?: string; parent?: string; quantity?: number; type?: "discount" | "shipping" | "sku" | "tax"; - } & { [key: string]: any })[]; + }[]; shipping?: { address: { city?: string; @@ -28153,13 +27792,13 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; carrier?: string; name?: string; phone?: string; tracking_number?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; }; }; }; @@ -28225,7 +27864,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -28333,7 +27972,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -28369,12 +28008,10 @@ export interface operations { content: { "application/x-www-form-urlencoded": { /** 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?: (Partial< - { - usage_gte: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + billing_thresholds?: Partial<{ + usage_gte: number; + }> & + Partial<"">; /** Specifies which fields in the response should be expanded. */ expand?: 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`. */ @@ -28406,7 +28043,7 @@ export interface operations { /** The identifier of the subscription to modify. */ subscription: string; /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + tax_rates?: Partial & Partial<"">; }; }; }; @@ -28467,16 +28104,14 @@ export interface operations { content: { "application/x-www-form-urlencoded": { /** 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?: (Partial< - { - usage_gte: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + billing_thresholds?: Partial<{ + usage_gte: number; + }> & + Partial<"">; /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ off_session?: boolean; /** @@ -28504,7 +28139,7 @@ export interface operations { /** The quantity you'd like to apply to the subscription item you're creating. */ quantity?: number; /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + tax_rates?: Partial & Partial<"">; }; }; }; @@ -28584,7 +28219,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -28649,35 +28284,29 @@ export interface operations { parameters: { query: { /** Only return subscription schedules that were created canceled the given date interval. */ - canceled_at?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + canceled_at?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** Only return subscription schedules that completed during the given date interval. */ - completed_at?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + completed_at?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** Only return subscription schedules that were created during the given date interval. */ - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** 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. */ @@ -28687,15 +28316,13 @@ export interface operations { /** 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?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + released_at?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** 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. */ @@ -28714,7 +28341,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -28753,19 +28380,17 @@ export interface operations { customer?: string; /** Object representing the subscription schedule's default settings. */ default_settings?: { - billing_thresholds?: (Partial< - { - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + billing_thresholds?: Partial<{ + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + }> & + Partial<"">; collection_method?: "charge_automatically" | "send_invoice"; default_payment_method?: string; invoice_settings?: { days_until_due?: number; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** 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. */ end_behavior?: "cancel" | "none" | "release" | "renew"; /** Specifies which fields in the response should be expanded. */ @@ -28773,44 +28398,40 @@ export interface operations { /** 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; /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** 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?: ({ + phases?: { application_fee_percent?: number; - billing_thresholds?: (Partial< - { - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + billing_thresholds?: Partial<{ + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + }> & + Partial<"">; collection_method?: "charge_automatically" | "send_invoice"; coupon?: string; default_payment_method?: string; - default_tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; + default_tax_rates?: Partial & Partial<"">; end_date?: number; invoice_settings?: { days_until_due?: number; - } & { [key: string]: any }; + }; iterations?: number; - plans: ({ - billing_thresholds?: (Partial< - { - usage_gte: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + plans: { + billing_thresholds?: Partial<{ + usage_gte: number; + }> & + Partial<"">; plan?: string; quantity?: number; - tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; - } & { [key: string]: any })[]; + tax_rates?: Partial & Partial<"">; + }[]; proration_behavior?: "always_invoice" | "create_prorations" | "none"; tax_percent?: number; trial?: boolean; trial_end?: number; - } & { [key: string]: any })[]; + }[]; /** 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?: (Partial & Partial<"now">) & { [key: string]: any }; + start_date?: Partial & Partial<"now">; }; }; }; @@ -28872,61 +28493,55 @@ export interface operations { "application/x-www-form-urlencoded": { /** Object representing the subscription schedule's default settings. */ default_settings?: { - billing_thresholds?: (Partial< - { - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + billing_thresholds?: Partial<{ + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + }> & + Partial<"">; collection_method?: "charge_automatically" | "send_invoice"; default_payment_method?: string; invoice_settings?: { days_until_due?: number; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; /** 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. */ end_behavior?: "cancel" | "none" | "release" | "renew"; /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** 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?: ({ + phases?: { application_fee_percent?: number; - billing_thresholds?: (Partial< - { - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + billing_thresholds?: Partial<{ + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + }> & + Partial<"">; collection_method?: "charge_automatically" | "send_invoice"; coupon?: string; default_payment_method?: string; - default_tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; - end_date?: (Partial & Partial<"now">) & { [key: string]: any }; + default_tax_rates?: Partial & Partial<"">; + end_date?: Partial & Partial<"now">; invoice_settings?: { days_until_due?: number; - } & { [key: string]: any }; + }; iterations?: number; - plans: ({ - billing_thresholds?: (Partial< - { - usage_gte: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + plans: { + billing_thresholds?: Partial<{ + usage_gte: number; + }> & + Partial<"">; plan?: string; quantity?: number; - tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; - } & { [key: string]: any })[]; + tax_rates?: Partial & Partial<"">; + }[]; proration_behavior?: "always_invoice" | "create_prorations" | "none"; - start_date?: (Partial & Partial<"now">) & { [key: string]: any }; + start_date?: Partial & Partial<"now">; tax_percent?: number; trial?: boolean; - trial_end?: (Partial & Partial<"now">) & { [key: string]: any }; - } & { [key: string]: any })[]; + trial_end?: Partial & Partial<"now">; + }[]; /** 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; /** 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`. */ @@ -29007,33 +28622,27 @@ export interface operations { query: { /** The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. */ collection_method?: "charge_automatically" | "send_invoice"; - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; - current_period_end?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; - current_period_start?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; + current_period_end?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; + current_period_start?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** 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. */ @@ -29071,7 +28680,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -29113,13 +28722,11 @@ export interface operations { /** 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; /** 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?: (Partial< - { - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + billing_thresholds?: Partial<{ + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + }> & + Partial<"">; /** 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; /** Boolean indicating whether this subscription should cancel at the end of the current period. */ @@ -29137,24 +28744,22 @@ export interface operations { /** 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; /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + default_tax_rates?: Partial & Partial<"">; /** Specifies which fields in the response should be expanded. */ expand?: string[]; /** A list of up to 20 subscription items, each with an attached plan. */ - items?: ({ - billing_thresholds?: (Partial< - { - usage_gte: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + items?: { + billing_thresholds?: Partial<{ + usage_gte: number; + }> & + Partial<"">; metadata?: { [key: string]: string }; plan?: string; quantity?: number; - tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; - } & { [key: string]: any })[]; + tax_rates?: Partial & Partial<"">; + }[]; /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ off_session?: boolean; /** @@ -29166,13 +28771,11 @@ export interface operations { */ payment_behavior?: "allow_incomplete" | "error_if_incomplete" | "pending_if_incomplete"; /** 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?: (Partial< - { - interval: "day" | "month" | "week" | "year"; - interval_count?: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + pending_invoice_item_interval?: Partial<{ + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + }> & + Partial<"">; /** 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; /** @@ -29182,9 +28785,9 @@ export interface operations { */ proration_behavior?: "always_invoice" | "create_prorations" | "none"; /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + tax_percent?: Partial & Partial<"">; /** 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?: (Partial<"now"> & Partial) & { [key: string]: any }; + trial_end?: Partial<"now"> & Partial; /** 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; /** 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. */ @@ -29253,15 +28856,13 @@ export interface operations { /** 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). */ billing_cycle_anchor?: "now" | "unchanged"; /** 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?: (Partial< - { - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + billing_thresholds?: Partial<{ + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + }> & + Partial<"">; /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + cancel_at?: Partial & Partial<"">; /** Boolean indicating whether this subscription should cancel at the end of the current period. */ cancel_at_period_end?: boolean; /** 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`. */ @@ -29275,37 +28876,33 @@ export interface operations { /** 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; /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + default_tax_rates?: Partial & Partial<"">; /** Specifies which fields in the response should be expanded. */ expand?: string[]; /** List of subscription items, each with an attached plan. */ - items?: ({ - billing_thresholds?: (Partial< - { - usage_gte: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + items?: { + billing_thresholds?: Partial<{ + usage_gte: number; + }> & + Partial<"">; clear_usage?: boolean; deleted?: boolean; id?: string; - metadata?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; plan?: string; quantity?: number; - tax_rates?: (Partial & Partial<"">) & { [key: string]: any }; - } & { [key: string]: any })[]; + tax_rates?: Partial & Partial<"">; + }[]; /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** Indicates if a customer is on or off-session while an invoice payment is attempted. */ off_session?: boolean; /** If specified, payment collection for this subscription will be paused. */ - pause_collection?: (Partial< - { - behavior: "keep_as_draft" | "mark_uncollectible" | "void"; - resumes_at?: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + pause_collection?: Partial<{ + behavior: "keep_as_draft" | "mark_uncollectible" | "void"; + resumes_at?: number; + }> & + Partial<"">; /** * 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. * @@ -29315,13 +28912,11 @@ export interface operations { */ payment_behavior?: "allow_incomplete" | "error_if_incomplete" | "pending_if_incomplete"; /** 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?: (Partial< - { - interval: "day" | "month" | "week" | "year"; - interval_count?: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + pending_invoice_item_interval?: Partial<{ + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + }> & + Partial<"">; /** 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; /** @@ -29335,9 +28930,9 @@ export interface operations { /** 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; /** 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?: (Partial & Partial<"">) & { [key: string]: any }; + tax_percent?: Partial & Partial<"">; /** 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?: (Partial<"now"> & Partial) & { [key: string]: any }; + trial_end?: Partial<"now"> & Partial; /** 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; }; @@ -29418,15 +29013,13 @@ export interface operations { /** Optional flag to filter by tax rates that are either active or not active (archived) */ active?: boolean; /** Optional range for filtering created date */ - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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. */ @@ -29451,7 +29044,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -29572,7 +29165,7 @@ export interface operations { /** The jurisdiction for the tax rate. */ jurisdiction?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; }; }; }; @@ -29630,7 +29223,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -29673,13 +29266,13 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; /** A name for the location. */ display_name: string; /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; }; }; }; @@ -29747,13 +29340,13 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; /** A name for the location. */ display_name?: string; /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; }; }; }; @@ -29818,7 +29411,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -29860,7 +29453,7 @@ export interface operations { /** 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; /** Set of key-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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** A code generated by the reader used for registering to an account. */ registration_code: string; }; @@ -29927,7 +29520,7 @@ export interface operations { /** The new label of the reader. */ label?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; }; }; }; @@ -29992,7 +29585,7 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; address_kana?: { city?: string; country?: string; @@ -30001,7 +29594,7 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; address_kanji?: { city?: string; country?: string; @@ -30010,7 +29603,7 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; directors_provided?: boolean; executives_provided?: boolean; name?: string; @@ -30042,9 +29635,9 @@ export interface operations { document?: { back?: string; front?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; + }; individual?: { address?: { city?: string; @@ -30053,7 +29646,7 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; address_kana?: { city?: string; country?: string; @@ -30062,7 +29655,7 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; address_kanji?: { city?: string; country?: string; @@ -30071,15 +29664,13 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; - dob?: (Partial< - { - day: number; - month: number; - year: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + }; + dob?: Partial<{ + day: number; + month: number; + year: number; + }> & + Partial<"">; email?: string; first_name?: string; first_name_kana?: string; @@ -30090,22 +29681,22 @@ export interface operations { last_name_kana?: string; last_name_kanji?: string; maiden_name?: string; - metadata?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; phone?: string; ssn_last_4?: string; verification?: { additional_document?: { back?: string; front?: string; - } & { [key: string]: any }; + }; document?: { back?: string; front?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; + }; tos_shown_and_accepted?: boolean; - } & { [key: string]: any }; + }; /** The bank account this token will represent. */ bank_account?: { account_holder_name?: string; @@ -30114,24 +29705,22 @@ export interface operations { country: string; currency?: string; routing_number?: string; - } & { [key: string]: any }; - card?: (Partial< - { - 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; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + }; + card?: Partial<{ + 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; + }> & + Partial; /** 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; /** Specifies which fields in the response should be expanded. */ @@ -30145,7 +29734,7 @@ export interface operations { line2?: string; postal_code?: string; state?: string; - } & { [key: string]: any }; + }; address_kana?: { city?: string; country?: string; @@ -30154,7 +29743,7 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; + }; address_kanji?: { city?: string; country?: string; @@ -30163,15 +29752,13 @@ export interface operations { postal_code?: string; state?: string; town?: string; - } & { [key: string]: any }; - dob?: (Partial< - { - day: number; - month: number; - year: number; - } & { [key: string]: any } - > & - Partial<"">) & { [key: string]: any }; + }; + dob?: Partial<{ + day: number; + month: number; + year: number; + }> & + Partial<"">; email?: string; first_name?: string; first_name_kana?: string; @@ -30182,32 +29769,32 @@ export interface operations { last_name_kana?: string; last_name_kanji?: string; maiden_name?: string; - metadata?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; phone?: string; relationship?: { director?: boolean; executive?: boolean; owner?: boolean; - percent_ownership?: (Partial & Partial<"">) & { [key: string]: any }; + percent_ownership?: Partial & Partial<"">; representative?: boolean; title?: string; - } & { [key: string]: any }; + }; ssn_last_4?: string; verification?: { additional_document?: { back?: string; front?: string; - } & { [key: string]: any }; + }; document?: { back?: string; front?: string; - } & { [key: string]: any }; - } & { [key: string]: any }; - } & { [key: string]: any }; + }; + }; + }; /** The PII this token will represent. */ pii?: { id_number?: string; - } & { [key: string]: any }; + }; }; }; }; @@ -30248,25 +29835,21 @@ export interface operations { parameters: { query: { /** A positive integer representing how much to transfer. */ - amount?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + amount?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** 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?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `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. */ @@ -30291,7 +29874,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -30335,7 +29918,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** 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; /** Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. */ @@ -30406,7 +29989,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; }; }; }; @@ -30445,15 +30028,13 @@ export interface operations { GetTransfers: { parameters: { query: { - created?: (Partial< - { - gt?: number; - gte?: number; - lt?: number; - lte?: number; - } & { [key: string]: any } - > & - Partial) & { [key: string]: any }; + created?: Partial<{ + gt?: number; + gte?: number; + lt?: number; + lte?: number; + }> & + Partial; /** 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. */ @@ -30481,7 +30062,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -30568,7 +30149,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -30621,7 +30202,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** 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; }; @@ -30692,7 +30273,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; }; }; }; @@ -30761,7 +30342,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; }; }; }; @@ -30792,7 +30373,7 @@ export interface operations { object: "list"; /** The URL where this list can be accessed. */ url: string; - } & { [key: string]: any }; + }; }; }; /** Error response. */ @@ -31083,7 +30664,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** The URL of the webhook endpoint. */ url: string; }; @@ -31304,7 +30885,7 @@ export interface operations { /** Specifies which fields in the response should be expanded. */ expand?: 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?: (Partial<{ [key: string]: string }> & Partial<"">) & { [key: string]: any }; + metadata?: Partial<{ [key: string]: string }> & Partial<"">; /** The URL of the webhook endpoint. */ url?: string; }; diff --git a/tests/v3/index.test.ts b/tests/v3/index.test.ts index f8a659fe8..575b5c75b 100644 --- a/tests/v3/index.test.ts +++ b/tests/v3/index.test.ts @@ -17,6 +17,20 @@ describe("cli", () => { expect(generated).toBe(expected); }); + it(`reads ${schema} spec (v3) from file (additional properties)`, () => { + const output = schema.replace(".yaml", ".additional.ts"); + + execSync( + `../../bin/cli.js specs/${schema} -o generated/${output} --prettier-config .prettierrc --additional-properties`, + { + cwd: __dirname, + } + ); + const expected = readFileSync(join(__dirname, "expected", output), "utf8"); + const generated = readFileSync(join(__dirname, "generated", output), "utf8"); + expect(generated).toBe(expected); + }); + it(`reads ${schema} spec (v3) from file (immutable types)`, () => { const output = schema.replace(".yaml", ".immutable.ts");